Restrict Date Range picker to whole weeks #2984
nickfanion
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
A prop that restricts the Date Range picker to whole weeks based on a user defined week start day (for example, setting the week start day to 'Monday' would restrict date ranges to weekly Monday-Sunday increments). Additionally, include
presetRanges
for weekly increments like'Latest Week'
'Latest 4 Weeks'
'Latest 13 Weeks'
'Latest 26 Weeks'
'Latest 52 Weeks'
What problem would this solve?
I exclusively work with retail and manufacturing data that is frequently provided at a weekly granularity and follows a fiscal calendar. I think the Date Range picker could be further expanded to allow the definition of a custom fiscal calendar and handle things like 4 or 5 week 'months'/periods and 52 week years (with the occasional 53 week year). However, a simpler start would be the ability to restrict selection to full weeks to prevent user confusion when daily granularity isn't available.
My current workaround is to use a Dropdown with predefined date ranges instead of Date Range, or provide explainer text so the user knows individual days aren't available.
How should it work?
No response
Beta Was this translation helpful? Give feedback.
All reactions