I’m unable to get two way binding work in a simple datepicker control, using angularjs and html markup initialisation.
http://webix.com/snippet/4911e377
Could you please help?
I’m unable to get two way binding work in a simple datepicker control, using angularjs and html markup initialisation.
http://webix.com/snippet/4911e377
Could you please help?
Hello,
Firstly, you need to listen to the datepicker’s onChange
event:
<div view="datepicker" value="{{startDate}}"
webix-event="onChange=onChange(id, details);"
And secondly, you need to call the $scope.$digest()
method in the controller to ensure that the changed data is pushed to the view:
$scope.onChange = function(id, details){
$scope.startDate = parser(details[0]);
$scope.$digest();
};
Please, check it in the following snippet: http://webix.com/snippet/d8dc8d75
Ok, Thanks!