KnockoutJS dealing with bootstrap datepickers and date formats
问题 This is the datepicker binding i'm using ( im sorry but i forgot where i took it so i can't give the author proper credit. I will edit if i remember. ) ko.bindingHandlers.datepicker = { init: function(element, valueAccessor, allBindingsAccessor) { //initialize datepicker with some optional options var options = allBindingsAccessor().datepickerOptions || {}; $(element).datepicker(options); //when a user changes the date, update the view model ko.utils.registerEventHandler(element, "changeDate"