[BUG] Input[date|time|datetime-local] min & max attributes ignore ngModelOptions timezone #16342
Description
I'm submitting a ...
- bug report
- feature request
- other
Current behavior:
Using ngModelOptions
developers can set timezone for input[date|time|datetime-local]
for parsers and formatters. However this does not affect min and max validation.
https://github.com/angular/angular.js/blob/master/src/ng/directive/input.js#L1475
https://github.com/angular/angular.js/blob/master/src/ng/directive/input.js#L1486
Parsers and formatters take timezone into account.
https://github.com/angular/angular.js/blob/master/src/ng/directive/input.js#L1445
Expected / new behavior:
Take timezone into account when validating minimum and maximum date spans.
Minimal reproduction of the problem with instructions:
Select 2013-12-31 if you aren't on UTC it should be invalid.
https://plnkr.co/edit/i88I219Wke77tdUSA3XF?p=preview
AngularJS version: 1.6.6
Browser: [all]