Datepicker: beforeShowDay is passed wrong date when dayNamesShort are used
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.3k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
👋
I had raised a similar issue previously #1971, which was for "D M d yy" format. I have found that the same problem happens with dd. MM yy format too.
Please check this minimal example to recreate the problem.: https://jsfiddle.net/smnt1o5r/2/
Please note that the dates passed to the callback function are of 2031, which is very random
I also noticed that this time the problem is not dependent on dayNamesShort
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the minimal jsFiddle reproduction linked in the issue and inspect the datepicker path that invokes the beforeShowDay callback. Reproduce the issue with the dd. MM yy format and compare the dates received by the callback with the displayed dates. Done means the callback receives the correct dates for this format and the existing example no longer reports dates from 2031.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100