Knockout js: el controlador de enlace del selector de fecha no funciona
Frecuentes
Visto 847 equipos
0
This is my fiddle. http://jsfiddle.net/aaScC/4/
In the example, for the StartDate property custom binding handler is created to get jquery datepicker. But its not working please help.
var Goal = function(goal)
{
this.GoalTitle = ko.observable(goal?goal.GoalTitle:"");
this.StartDate = ko.observable(goal?goal.StartDate:"");
this.lstSubGoals = ko.observableArray(goal ? ko.utils.arrayMap(goal.lstSubGoals, function (goal) { return new Goal(goal) }) : []);
}
1 Respuestas
1
- Move the call to ko.applyBindings after your declaration of the custom binding
- Bring in jqueryUI and it's CSS
- daterestriction function is not found
Violín de trabajo: http://jsfiddle.net/aaScC/5/
--
ko.bindingHandlers.datepicker = {
init: function (element, valueAccessor, allBindingsAccessor) {
...
},
update: function (element, valueAccessor) {
...
}
};
ko.applyBindings(new GoalsModel(data), document.getElementById("goaldetailsdiv"));
Respondido 08 Feb 14, 14:02
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas javascript jquery knockout.js or haz tu propia pregunta.
Thanq so much for your reply. - dineshd87