Skip to content

typing in hour or minutes input field does not trigger change to the value. #58

@gaurav-chandra

Description

@gaurav-chandra

Describe the bug

I have a client requirement to update the date and time on closing the picker. When I type in the picker's hour and minutes fields and click outside the picker to close it, flatpickrClose event only registers a change in the date and not the hour or time. But if I use arrows, then it registers a change in the value of hours or minutes.

Minimal reproduction of the problem with instructions

  1. install usually and use the following:
<input class="form-control datetimepicker" type="text" placeholder="Set Date & Time"
		[(ngModel)]="date" [allowInput]="true" mwlFlatpickr [enableTime]="true" [convertModelValue]="true"
		[disableMobile]="true"
		[dateFormat]="'d-m-Y G:i K'" [minuteIncrement]="5" [hourIncrement]="1" (flatpickrClose)="onClose($event)">
  1. then click on the input field to open the picker
  2. change the date and type in the hour or minute field
  3. click outside the picker boundary. it closes the picker and triggers flatpickrClose event
  4. Check the event.dateString
  5. You will see that only the date changes but not the hour or minutes

Screenshots

No response

@angular/core version

18.2.8

angularx-flatpickr version

8.1.0

Browser name and version

Chrome 133

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions