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', }