fetrarij / ngx-daterangepicker-material

Pure Angular 2+ date range picker with material design theme, a demo here:
https://fetrarij.github.io/ngx-daterangepicker-material/
MIT License
246 stars 247 forks source link

Issue with End date and maxDate option #486

Open gopal-augment opened 1 year ago

gopal-augment commented 1 year ago

Versions

Describe the bug When I set the maxDate. If I select the end date of the max date, got the below error

To Reproduce

  1. maxDate = dayjs().add(1, 'day'); // which will be date will enable up to current day + one day
  2. Select the start date and, select the end date of the next day of the current(maxDate) date

Screenshots image

image

Rapiiidooo commented 1 year ago

Actually +1.

I would like to add more detail: in general Dayjs | date type are not supported anymore in 6.0.4

Current workaround @gopal-augment is to use a string in ISO format.

as follows: YYYY-MM-DD

gopal-augment commented 1 year ago

@Rapiiidooo If I set ISO format, it throws an error because of type Dayjs

Rapiiidooo commented 1 year ago

@gopal-augment use an any typed variable, error will disappear ;)

I've personally did like:

calendarMaxDate: any = dayjs().toISOString();