Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for different range format and/or token for rangeSeparator #2963

Open
davidwebca opened this issue Nov 22, 2023 · 0 comments
Open

Comments

@davidwebca
Copy link

davidwebca commented Nov 22, 2023

Hi,

Since the range salector gets put in a single Input, the range separator is localized in the format added and that could lead to errors when trying to parse out the date range in the back-end. The beta plugin that allows having two separate inputs solves this issue, but for the vanilla range input, that is a problem.

I suggest either adding an option to have a separate rangeFormat option + a range formatter token (ex.: r for localized, R for unlocalized English which defaults to "to")

{
    rangeFormat: "j M H:i R j M H:i"
}

Would yield 22 Nov 4:20 to 22 Nov 4:21

{
    rangeFormat: "j M H:i r j M H:i"
}

With French localization, would yield 22 Nov 4:20 au 22 Nov 4:21

With rangeFormat could be introduced altRangeFormat to follow what altFormat enables.

Your Environment

  • flatpickr version used: 4.6.13
  • Browser name and version: Safari 17.1
  • OS and version: Mac OS 14.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant