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

Let user only enter day month and time, no year #145

Closed
ZiangX opened this issue Apr 6, 2021 · 2 comments
Closed

Let user only enter day month and time, no year #145

ZiangX opened this issue Apr 6, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@ZiangX
Copy link

ZiangX commented Apr 6, 2021

Hi there, I would like to make a datetime picker that the user only needs to enter the day, month and time, no year. And I will default the year to 2021 behind the scene. Is it possible?
image

I tried the code below

 <DateTimePicker
    value={dateTime}
    onChange={setDateTime}
    format="dd/MM HH:mm"
  />

but it shows me an error of "Invalid date: Invalid Date". Could you give me some ideas of how to make it work, thank you!

@reymon359
Copy link

Hey @ZiangX I am facing a similar issue and would love to know if you found a solution to this 😄

@wojtekmaj wojtekmaj added the enhancement New feature or request label Feb 4, 2022
@reymon359
Copy link

@wojtekmaj Thank you so much for taking the time and updating the library with the feature! You're awesome 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants