-
Notifications
You must be signed in to change notification settings - Fork 82
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
Refactored Calendar component to remove dependency of primereact. (#2592 #2592
Conversation
CI failed |
@Cedar67 please have a review on the functionality |
How is it going @Cedar67 |
Two other high-priority issues are currently under validation. This PR will be arranged to complete the verification next Monday. |
@mortoys The display style for the current day and the selected date should remain the same as before. |
One exception: When selecting another month by the arrow symbol, it automatically jumps back to the current month. Screen.Recording.2023-03-06.at.2.31.40.PM.mov |
@mortoys Received. Thanks for your feedback. This product requirement change confirmation has been submitted to PM. Wait for his feedback. |
Verified. |
Verified. |
It can be done by updating here https://github.com/nervosnetwork/neuron/pull/2592/files#diff-227821703ffb93fc0998891374bc9394fb37fb7bfb38486fd284b9b0c5aaef69R98-R101 const getLocalMonthNames = (lang: string) => {
const formater = new Intl.DateTimeFormat(lang, { month: 'short' })
return Array.from({ length: 12 }, (_, i) => `${formater.format(new Date(Date.UTC(2023, i, 1)))}${lang.startsWith('en') ? '.' : ''}`)
} |
I found some calendar accessibility examples here:https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/datepicker-dialog/ and a great wai-aria lesson: https://www.udacity.com/course/web-accessibility--ud891 |
Add focus style
It can be tested use Mac Voiceover(press Command-F5), and feel whether the blind can be used properly It's still a lot to do, e.g.
|
Code scanning and Unit test results indicate exceptions that need to be confirmed. |
Cannot be saved after the year is changed. Screen.Recording.2023-03-19.at.7.20.41.AM.mov |
Found a new issue to be confirmed by the developer. |
@Cedar67 |
Appreciate your contribution! |
Hi everyone,
I've reimplemented the new Calendar component as described below issue, and removed the dependency on primereact.
It generally follows the previous interactive logic, keeps the current system's colour and style, and adds a check for the available range of dates.
Any suggestions for improvement would be appreciated.
Magickbase/neuron-public-issues#66