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

airDatepickerInput() can't show month number but use 00 instead #704

Closed
CongSIBR opened this issue Sep 10, 2024 · 2 comments
Closed

airDatepickerInput() can't show month number but use 00 instead #704

CongSIBR opened this issue Sep 10, 2024 · 2 comments

Comments

@CongSIBR
Copy link

Dear Author,

Thank you for the fantastic package! However, I encountered an issue with the airDatepickerInput. As shown in the screenshot, after selecting a date range, the displayed date does not match my selection—the month of the date is shown as "00," even though the date data in the backend is correct.

the code I used is:

          inputId = ns("dateid"),
          label = "Select date range:",
          placeholder = "pick a range of dates",
          multiple = 2, 
          range = TRUE,
          dateFormat = "yyyy-mm-dd",
          clearButton = TRUE,
          minDate = '2017-03-18',
          maxDate = '2023-09-10',
          autoClose = TRUE
        ) 
Screenshot 2024-09-10 at 16 45 35
@pvictor
Copy link
Member

pvictor commented Sep 10, 2024

Hello,
Thanks for your kind words.
I think this is a problem with dateFormat, mm is for minutes, you should try MM for months. More examples here : https://air-datepicker.com/docs and here : https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table

Victor

@CongSIBR
Copy link
Author

Thanks for your help! It worked! It was indeed a mistake on my part.

@pvictor pvictor closed this as completed Sep 11, 2024
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

2 participants