Skip to content

Text input formats seem to have padding issues #1208

@cdr0y

Description

@cdr0y

Describe the bug
Input format behaviours are acing differenly between some modes. For example with a :formats={ input: 'dd/MM/yy' } i can type the date as 20/03/26 and it will auto focus that date on the datepicker, but if i type 20/3/26 it doesn't auto select. If i then add a space after the 'yy' in the date format it allows me to type the date as 20/03/26 or 20/3/26 and it will select and prepend the 0 itself. This is manageable, apart from i haven't been able to find a format to sayisfy this when i set the picker to range mode.

To Reproduce
Steps to reproduce the behavior:

  1. ensure datepicker has a format, i am using 'dd/MM/yy' in this case
  2. ensure datepicker has auto-apply (im not sure if this is required to replicate)
  3. select a date in datepicker, then click the input to type
  4. remove both month numbers and type 03 for march, it should select.
  5. change month number to 4 for example, it will not auto select without the 0.
  6. add a space to the format so it says 'dd/MM/yy '
  7. repeat step 4 and 5, it will now autoselect the month as required.

This then happens with range but i cannot find a way to satisfy the format

Expected behavior
Date should auto select on the picker with the format passed in with or without the space at the end

Screenshots
no space no autoselect
Image

space added, date autoselects and prepends the 0 if needed
Image

apologies, this isn't the most straight forward issue to explain so if any further info is required please let me know and i will try and explain anything in more detail. This is fine on single date mode with the space as a work around, but not being able to type either format on range mode is killing me 😬

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions