I have added 'Today' button in jquery date picker.When i click on this button it is showing today's value on UI but it is not setting value to ember data.
below is code.
function setupDatepickerButtons(input) {
Ember.run.later(function() {
var buttonPane = Ember.$(input)
.datepicker("widget")
.find(".ui-datepicker-buttonpane");
buttonPane.find('.ui-datepicker-current').remove();
Ember.$('<button>', {
text: "Today",
click: function() {
Ember.$(visibleEl).datepicker('setDate', new Date());
Ember.$(visibleEl).datepicker('hide');
}
}).appendTo(buttonPane);
buttonPane.find("button").removeClass().addClass('btn btn-default');
});
}
Aucun commentaire:
Enregistrer un commentaire