meteor - Exception from Tracker afterFlush function: TypeError: $(...).calendar is not a function -
i trying use npm package ( https://www.npmjs.com/package/semantic-ui-calendar ) meteor, getting error in browser console:
exception tracker afterflush function: typeerror: $(...).calendar not function
i tried following installation fix error:
npm semantic-ui-calendar npm semantic-ui-calendar --save meteor npm semantic-ui-calendar meteor npm semantic-ui-calendar --save
my code:
blaze-html-template:
<template name="mytemplate"> <h3>date only</h3> <div class="ui calendar" id="example2"> <div class="ui input left icon"> <i class="calendar icon"></i> <input type="text" placeholder="date"> </div> </div> <br/> </template>
js-template-file:
template.mytemplate.onrendered(function() { $(document).ready(function() { $('#example2').calendar({ type: 'date' }); }); });
also moved jquery code onrendered helpers - without success.
did try
npm install --save semantic-ui-calendar
and import files package putting following @ top of file.
import { ... } 'semantic-ui-calendar'
Comments
Post a Comment