I have found an issue with saving of a manually typed date value.
Set minDate $scope.datePickerOptions = { minDate: new Date() };
Type the date in past (for example: 27/10/2015). The input value is reset to previous value, but in ngModel remain invalid value.
So I think need add handler for dp.error event:
$element.on('dp.error', function (e) { if (ngModelCtrl) { $timeout(function () { ngModelCtrl.$setViewValue(e.target.value); }); } }).datetimepicker(options);
What do you think?
I have found an issue with saving of a manually typed date value. Set minDate $scope.datePickerOptions = { minDate: new Date() }; Type the date in past (for example: 27/10/2015). The input value is reset to previous value, but in ngModel remain invalid value. So I think need add handler for dp.error event:
$element.on('dp.error', function (e) { if (ngModelCtrl) { $timeout(function () { ngModelCtrl.$setViewValue(e.target.value); }); } }).datetimepicker(options);
What do you think?