-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Datepicker - disable validation option #3836
Comments
I am currently in the process of working on a fix to the validation of the datepicker component here - once this is implemented, one can write a custom directive with a |
I found a way to hack around the current validation (albeit in a very strange way), my main pain point at the moment is this guy popping up angry and red in the console when I'm doing my own validation: |
Any more info on whether we can have that $log.error be a warning, or better yet, not exist? I've managed to hack my own validation, but that console error keeps coming up. |
One can disable $provide.factory('$log', function() {
return {
debug: angular.noop,
error: angular.noop,
log: angular.noop,
warn: angular.noop
};
}); |
I thought about doing that, but I really only wanted to disable the validation for this case, since I know that I'm overriding the typical validation here. I dont want to suppress all log messages in my application. I'll try to think of another way to work around it. |
One way is to file a PR that creates an injectable |
Okay I'll take a look at that, thanks! |
I too, am in need of disabling the validation. I set the entered value to the api on the model, even if the user has entered stuff that doesn't exactly match the format, like leading 0's for the day and month. Could we add a disable-validation attribute that turns off the datepicker's validation to allow setting invalid values? Note that I've tried |
It would be a great thing if this would be implemented. I for example is using using this datepicker as a filter header in ui-grid. If a user then wants to only write 2014, then the filtering won't work as 2014 is not a valid date. |
I have a situation where in some cases where I am using the datepicker popup and I don't want the manually entered input to go through the datepicker's validation (I want to do custom validation instead). Are there any plans to have either an option to disable validation on the datepicker or an option to provide custom validation for the datepicker (or maybe there's already a way that I'm too thick to discover today)? Thanks for all your work!
The text was updated successfully, but these errors were encountered: