question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add props to config datepicker year format

See original GitHub issue
  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

To display year from system calendar depend on moment format. for example Buddhist, Jalaali, Hijri, Taiwan.

Now we can change input display format by prop format but we can’t change date on calendar.

What does the proposed API look like?

When I use moment plug-in like this https://github.com/behrang/moment-jalaali I can use year format jYYYY to display Jalaali year.

<DatePicker
    format={'jD/jM/jYYYY'} // Input display format will change to Jalaali year.
    calendarFormat={{
        year: 'jYYYY', // Config year format on calendar
        month: 'MM'
    }}
>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
max-ariascommented, May 8, 2020

What’s the status of this? Still up for grabs?

0reactions
panudetjtcommented, Nov 29, 2022

Why this issue is closed it’s not solve any the problem. 😢

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add props to config datepicker year format - Issuehunt
To display year from system calendar depend on moment format. for example Buddhist, Jalaali, Hijri, Taiwan. Now we can change input display format...
Read more >
DatePicker date input with custom format - Stack Overflow
Just use the prop dateFormat="dd/MM/yyyy". Example : <DatePicker selected={ ...
Read more >
Date Format Cheat Sheet—How To Format Dates React ...
Today we will break down common date and time formats and share some handy tips for using KendoReact DatePicker.
Read more >
React custom datepicker: Step-by-step - LogRocket Blog
The calendar builder function takes a month and year as arguments, then returns an array of 42 elements, each representing a calendar date...
Read more >
Datepicker Widget - jQuery UI API Documentation
The jQuery UI Datepicker is a highly configurable plugin that adds datepicker functionality to your pages. You can customize the date format and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found