I have the following in my routes.js
path: '/signup-step1/',
component: Step1,
on: {
pageAfterIn: function test (e, page) {
// do something after page gets into the view
var calendarDOB = app.calendar.create({
inputEl: '#dob',
dateFormat: 'mm/dd/yyyy',
closeOnSelect: true,
//inputReadOnly: false,
});
},
}
When I load the page signup-step1, I get an error because app.calendar is not defined. (Cannot read property ‘create’ of undefined)
In my app.js, I have this at the top…
import Calendar from ‘framework7/components/calendar/calendar.js’;
Obviously that is not how to import a component. How do I do it?