Skip to content

Manually typed date and min/max dates #20

Description

@igorbar

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions