Friday, 15 March 2013

ember.js - How can I port a bound date input helper to HTMLBars? -


I'm trying to port a 'DateInputView' TextField extension with HTMLBars to a Supporting Assistant. It appears that 'call' has been removed from 'handlar.holls.viewview' so that the assistant does not work anymore. I've tried many syntax changes based on the forum, but nothing works The field is a datipiker that switches to the native calendar picker when using a mobile device. I see an example where the left ancillary scene is integrated into the assist code, so one uses a JS file compared to the two, so it is now trying to go the route. If the code is below for any HTMLBars to know it to work again please let me know.

  // ../templates/avail/navigation.hbs {{date-input id = "checkin" valueBinding = "controller. Marriage. Arrival" category = "form-control date-picker "}} // ../views/date-input.js var DateInputView = Ember.TextField.extend ({didInsertElement: function () {Ember.run} ScheduleOnce ('afterreender', this, this._setupDateInput);}, _setupDateInput: function () {var _this = this; var type = amber. $ (This.get ('element')). Attr ('type'); // Set date picker for object if (type === "Input") {Amber. $ (This.get ('element')) datepicker ({format: "yyyy-mm-dd", autoclose: true}}}}}}); Export Default Date Input View; // .. /helpers/date-input.js Import Date Input View '// // views / date-input'; Export Default Ember.Handlebars.makeBoundHelper (function (option) {Ember.assert ('You can only pass attributes for' input 'helper, arguments not', arguments.length & lt; 2); var hash = options .hash, type = options.hashTypes, inputType = hash.type, deleteEvent = hash.on; hash.type; delete hash; hash.type = "input"; if (/ Android | WebOS | iPhone | iPad | iPod | Blackberry | Iemobile | Opera Mini / i.test (navigator.userAgent)) hash.type = "date"}} hash.onEvent = onEvent || 'Enter'; Return to Amber.Handlebars.Holder.UewCol ( Further, Dinankinputdrishy, ​​options);});  

I am working this view again as a sequence.


No comments:

Post a Comment