logbon72 / angular-material-datetimepicker

Datepicker for Angular Material, mimick's Android's date time picker
https://logbon72.github.io/angular-material-datetimepicker
MIT License
169 stars 123 forks source link

minDate and maxDate mixed up #96

Closed fabienbranchel closed 7 years ago

fabienbranchel commented 7 years ago

When we use two datetimepickers on same page, minDate and maxDate are mixed up. You can test it on your demo, in the DateRange Example : https://logbon72.github.io/angular-material-datetimepicker/

  1. Select a start date.
  2. Reopen the start date : all is ok
  3. Open the end date : we can't select date before start date, all is ok
  4. Select the end date.
  5. Reopen the start date : we can't select a date before than start date we previously selected
  6. Reopen the end date : we can't select a date after than end date we previously selected
hexadecy commented 7 years ago

As a workaround you have to set undefined attribute min-date or max-date. min-date="null" Not sure it's the best solution...

hexadecy commented 7 years ago

@fabienbranchel can you test in my fork?

fabienbranchel commented 7 years ago

@hexadecy thank you, seems to work ;-)