Describe the bug
if a custom format it's selected, the datepicker is not updating the displayed dates when they get changed by typing in the input field.
To Reproduce
Apply a custom format to the datepicker:
NgxDaterangepickerMd.forRoot({ ..., format: 'DD/MM/YYYY' })
once the datepicker is open, change the input date, the selected date won't change.
Expected behavior
the displayed start/end date should change along with the input.
Screenshots
Additional context
this is caused by if (!start.isValid() || !end.isValid()) inside inputChanged(e) function. The isValid() check fails because, since a custom format has been selected, dayjs needs CustomParseFormat as shown here (which is not currently imported) to parse strings correctly. This can be fixed importing CustomParseFormat in the component.
Versions
Describe the bug if a custom format it's selected, the datepicker is not updating the displayed dates when they get changed by typing in the input field.
To Reproduce Apply a custom format to the datepicker:
NgxDaterangepickerMd.forRoot({ ..., format: 'DD/MM/YYYY' })
once the datepicker is open, change the input date, the selected date won't change.
Expected behavior the displayed start/end date should change along with the input.
Screenshots
Additional context this is caused by
if (!start.isValid() || !end.isValid())
insideinputChanged(e)
function. TheisValid()
check fails because, since a custom format has been selected, dayjs needsCustomParseFormat
as shown here (which is not currently imported) to parse strings correctly. This can be fixed importingCustomParseFormat
in the component.