universe:blaze-date-tiles

v1.0.1Published 10 years ago

This package has not had recent updates. Please investigate it's current state before committing to using it in your project.

Date Tiles Component for Blaze

Using as standalone

1<template name="myFile">
2     {{> universeDateTiles selectedDate=getDate currentDate=getDate}}
3</template>

getDate is your helper that returns date object

This template triggers a change event any time new date was selected (you can block changing of value by calling preventDefault() for event) there is also navigateToDate event.

example:

1Template.yourTemplate.events({
2    change (event, template, newDate) {
3        console.log(newDate);
4    }
5});

Using with AutoForms

as a QuickField

1{{> afQuickField name='myDate' type='universeDateTiles'}}

in Schema:

//Add this part to field in schema
autoform: {
     type: 'universeDateTiles',
}