md-pickers icon indicating copy to clipboard operation
md-pickers copied to clipboard

minDate/maxDate parsing error

Open robin-thoni opened this issue 7 years ago • 1 comments

The date format seems to be ignored when passing minDate/maxDate as string instead of date object:

selection_002 selection_003

The date format is DD-MM-YYYY, but the date is parsed as MM-DD-YYYY.

To reproduce: Change the following in demo/index.html

@@ -151,8 +151,8 @@
         <mdp-date-picker
                 ng-model="custom.date3"
                 mdp-placeholder="{{ custom.datePlaceholder3 }}"
-                mdp-min-date="custom.minDate3"
-                mdp-max-date="custom.maxDate3"
+                mdp-min-date="custom.minDateStr3"
+                mdp-max-date="custom.maxDateStr3"
                 mdp-ok-label="{{ custom.okLabel3 }}"
                 mdp-cancel-label="{{ custom.cancelLabel3 }}"
                 mdp-date-filter="custom.dateFilter3"

The minTime/maxTime parsing seems to be okay

robin-thoni avatar Jul 01 '17 03:07 robin-thoni

Confirmed. I think this is because when the dialog is called we don't convert the min / max dates to dates but haven't checked yet

dpoetzsch avatar Jul 04 '17 17:07 dpoetzsch