Open full view…

Picker & Calendar date picker loading problem

Thu, 29 Dec 2016 01:01:38 GMT

I have a picker and a calendar date picker that will be used on both index page and an edit page. They work fine on index page, but on edit page, if I load the page for first time, they appear, but if I then save the data and go to the edit page again, they won't popup anymore. My js: myApp.onPageInit('edit',function(page){ var pageContainer=$$(page.container); var calendarDateFormat = myApp.calendar({ input: '#calendar-date-format-edit', weekHeader: false, dateFormat: 'MM dd, yyyy' }); var pickerTypeEdit = myApp.picker({ input: '#picker-type-edit', cols: [ { textAlign: 'center', values: ['Health Check', 'Other'] } ] }); }); html: <input name="date" type="text" readonly id="calendar-date-format-edit" placeholder="Date" value="{{date}}"> <input type="text" name="type" placeholder="Meeting type" readonly id="picker-type-edit" value="{{type}}">

Thu, 29 Dec 2016 22:05:56 GMT

Anyone can help?

Fri, 30 Dec 2016 02:49:09 GMT

--- var target=pageContainer.find('#calendar-date-format-edit'); var calendar=myApp.calendar({ input:target });

Fri, 30 Dec 2016 02:51:39 GMT

Solved! Thx!

Mon, 09 Oct 2017 20:39:03 GMT