PLASMA-7233: make DatePickerRange inputs independent#2814
Conversation
📝 WalkthroughWalkthroughDatePickerRange adds independent single-date selection via an ChangesDatePickerRange Single-Value Selection and Smart Bounds
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed: dependency version conflict. Check your lock file or package.json. Comment |
|
Theme Builder app deployed! https://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-2814/ |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/plasma-new-hope/src/components/Calendar/hoc/withRange.tsx`:
- Around line 49-53: The current else branch only calls onChangeSingleValue and
drops onChangeValue when onChangeSingleValue is undefined; change the logic so
that when startValue is falsy you call onChangeSingleValue if provided,
otherwise fall back to onChangeValue so existing range consumers still receive
updates—specifically update the block around startValue to: if (startValue) call
onChangeValue([first, second], dateInfo); else if (onChangeSingleValue) call
onChangeSingleValue(newDay, dateInfo); else call onChangeValue([newDay, newDay],
dateInfo) (use the symbols onChangeValue, onChangeSingleValue, startValue,
newDay, first, second, dateInfo to locate the code).
In `@website/sdds-insol-docs/docs/components/DatePicker.mdx`:
- Around line 849-850: The current nextMonth calculation overflows when the
current day doesn't exist in the following month (e.g., Jan 31 -> Mar 1). Update
the logic around the today and nextMonth variables to clamp the day to the last
day of the next month: compute the last day of the month after next (using new
Date(today.getFullYear(), today.getMonth() + 2, 0)) to get the maximum day, then
set nextMonth's day to Math.min(today.getDate(), thatLastDay) so nextMonth
becomes the same day or the month’s last day instead of overflowing;
alternatively, for docs simplicity, use a fixed-day offset from today.
In `@website/sdds-netology-docs/docs/components/DatePicker.mdx`:
- Around line 849-850: The current nextMonth calculation overflows when the next
month has fewer days (e.g., Jan 31 → Mar 3); replace the simple new
Date(today.getFullYear(), today.getMonth() + 1, today.getDate()) with a
capped-day approach: compute daysInNextMonth = new Date(today.getFullYear(),
today.getMonth() + 2, 0).getDate() and set nextMonth = new
Date(today.getFullYear(), today.getMonth() + 1, Math.min(today.getDate(),
daysInNextMonth)); this keeps the same day when possible and uses the last day
of the next month when the current day would overflow (variables: today,
nextMonth, daysInNextMonth).
In `@website/sdds-platform-ai-docs/docs/components/DatePicker.mdx`:
- Around line 849-850: The current nextMonth calculation using new
Date(today.getFullYear(), today.getMonth() + 1, today.getDate()) can overflow
when the same day doesn't exist in the next month (e.g., Jan 31 -> Mar 1);
update the nextMonth logic to clamp the day to the last day of the target month
by computing the number of days in the next month and using
Math.min(today.getDate(), daysInNextMonth) when constructing nextMonth
(referencing the today and nextMonth variables in DatePicker.mdx). This ensures
nextMonth becomes the last day of the next month when the current day is too
large; alternatively, for docs simplicity you can use a fixed day offset like
adding 30 days to today.
In `@website/sdds-scan-docs/docs/components/DatePicker.mdx`:
- Around line 754-755: The current nextMonth calculation (using today and
nextMonth) can overflow when the current day doesn’t exist in the following
month (e.g., Jan 31 → Mar 3); replace it with a safe calculation that clamps to
the last day of the next month by constructing the date using month+2 with day 0
(or otherwise compute the last day of the next month) so nextMonth always yields
the last valid date in the next month instead of rolling into the following
month.
In `@website/sdds-serv-docs/docs/components/DatePicker.mdx`:
- Around line 849-850: The current nextMonth calculation (const today = new
Date(); const nextMonth = new Date(today.getFullYear(), today.getMonth() + 1,
today.getDate());) can overflow when the same day doesn't exist in the next
month (e.g., Jan 31 → Mar 1); fix it by capping the day to the last day of the
target month: compute the number of days in the next month (e.g., by using a
Date trick to get the last day: new Date(year, month+2, 0)) and set nextMonth's
day to Math.min(today.getDate(), daysInNextMonth) so nextMonth becomes the
correct last day (e.g., June 30) instead of rolling into the following month.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 648e432f-d851-4707-b5af-fbafd3cc3dc9
⛔ Files ignored due to path filters (70)
cypress/snapshots/cs/chromium/DatePicker/DatePicker -- disabled, readOnly.snap.pngis excluded by!**/*.pngcypress/snapshots/cs/webkit/DatePicker/DatePicker -- disabled, readOnly.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker dateShortcuts, dateShortcutsPlacement=left, dateShortcutsWidth=5rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker dateShortcuts, dateShortcutsPlacement=right, dateShortcutsWidth=10rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker select day in popover.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker select month by arrows.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker select month in popover.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker select year by arrows.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker select year in popover.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- calendarContainerWidth, calendarContainerHeight.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- case very future date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- controlled datepicker reset date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- defaultDate, enableContentLeft, enableContentRight.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- input date from calendar.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- input date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- input masked date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- label, leftHelper, placeholder.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- renderFromDate.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- size=l.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- size=m.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- size=s.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- size=xs.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- stretch.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- view=default, size=xl.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- appearance=clear, firstValueError, secondValueError.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- appearance=clear, firstValueSuccess, secondValueSuccess.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- appearance=clear, hasClearDivider.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- calendarContainerWidth, calendarContainerHeight.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- controlled datepicker reset date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- dateShortcuts, dateShortcutsPlacement=left, dateShortcutsWidth=5rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- dateShortcuts, dateShortcutsPlacement=right, dateShortcutsWidth=10rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- defaultDate, enableContent.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- hintText, required, requiredPlacement=right.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- label, leftHelper, placeholder.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- renderFromDate.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- stretch.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker dateShortcuts, dateShortcutsPlacement=left, dateShortcutsWidth=5rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker dateShortcuts, dateShortcutsPlacement=right, dateShortcutsWidth=10rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker select day in popover.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker select month by arrows.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker select month in popover.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker select year by arrows.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker select year in popover.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- calendarContainerWidth, calendarContainerHeight.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- case very future date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- controlled datepicker reset date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- defaultDate, enableContentLeft, enableContentRight.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- input date from calendar.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- input date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- input masked date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- label, leftHelper, placeholder.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- renderFromDate.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- size=l.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- size=m.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- size=s.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- size=xs.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- stretch.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- view=default, size=xl.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- appearance=clear, firstValueError, secondValueError.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- appearance=clear, firstValueSuccess, secondValueSuccess.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- appearance=clear, hasClearDivider.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- calendarContainerWidth, calendarContainerHeight.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- controlled datepicker reset date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- dateShortcuts, dateShortcutsPlacement=left, dateShortcutsWidth=5rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- dateShortcuts, dateShortcutsPlacement=right, dateShortcutsWidth=10rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- defaultDate, enableContent.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- hintText, required, requiredPlacement=right.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- label, leftHelper, placeholder.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- renderFromDate.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- stretch.snap.pngis excluded by!**/*.png
📒 Files selected for processing (21)
packages/plasma-new-hope/src/components/Calendar/Calendar.types.tspackages/plasma-new-hope/src/components/Calendar/hoc/withRange.tsxpackages/plasma-new-hope/src/components/Calendar/utils/getDateWithModification.tspackages/plasma-new-hope/src/components/DatePicker/DatePicker.component-test.tsxpackages/plasma-new-hope/src/components/DatePicker/DatePicker.template-doc.mdxpackages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDate.tsxpackages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.tsxpackages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.tswebsite/plasma-b2c-docs/docs/components/DatePicker.mdxwebsite/plasma-giga-docs/docs/components/DatePicker.mdxwebsite/plasma-homeds-docs/docs/components/DatePicker.mdxwebsite/plasma-web-docs/docs/components/DatePicker.mdxwebsite/sdds-bizcom-docs/docs/components/DatePicker.mdxwebsite/sdds-cs-docs/docs/components/DatePicker.mdxwebsite/sdds-dfa-docs/docs/components/DatePicker.mdxwebsite/sdds-finai-docs/docs/components/DatePicker.mdxwebsite/sdds-insol-docs/docs/components/DatePicker.mdxwebsite/sdds-netology-docs/docs/components/DatePicker.mdxwebsite/sdds-platform-ai-docs/docs/components/DatePicker.mdxwebsite/sdds-scan-docs/docs/components/DatePicker.mdxwebsite/sdds-serv-docs/docs/components/DatePicker.mdx
There was a problem hiding this comment.
🧹 Nitpick comments (1)
utils/plasma-sb-utils/src/components/DatePicker/meta.ts (1)
38-38: ⚡ Quick winNormalize Storybook
minto start-of-day.
min: new Date()includes the current time, which can make day-level demos behave inconsistently during the day. Prefer a date-only boundary.Suggested change
- min: new Date(), + min: new Date(new Date().setHours(0, 0, 0, 0)),🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@utils/plasma-sb-utils/src/components/DatePicker/meta.ts` at line 38, The Storybook story sets min: new Date(), which captures the current time and can make day-level demos inconsistent; update the min property in meta.ts to a normalized start-of-day date (e.g., construct a Date at 00:00:00 for today) so the boundary is date-only; locate the min property in the exported story meta (the min field) and replace new Date() with a start-of-day Date (using Date#setHours(0,0,0,0) or a shared startOfDay helper) to ensure deterministic day-level behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@utils/plasma-sb-utils/src/components/DatePicker/meta.ts`:
- Line 38: The Storybook story sets min: new Date(), which captures the current
time and can make day-level demos inconsistent; update the min property in
meta.ts to a normalized start-of-day date (e.g., construct a Date at 00:00:00
for today) so the boundary is date-only; locate the min property in the exported
story meta (the min field) and replace new Date() with a start-of-day Date
(using Date#setHours(0,0,0,0) or a shared startOfDay helper) to ensure
deterministic day-level behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7e183e6d-3517-49ac-8913-5592b4d5edab
⛔ Files ignored due to path filters (70)
cypress/snapshots/cs/chromium/DatePicker/DatePicker -- disabled, readOnly.snap.pngis excluded by!**/*.pngcypress/snapshots/cs/webkit/DatePicker/DatePicker -- disabled, readOnly.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker dateShortcuts, dateShortcutsPlacement=left, dateShortcutsWidth=5rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker dateShortcuts, dateShortcutsPlacement=right, dateShortcutsWidth=10rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker select day in popover.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker select month by arrows.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker select month in popover.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker select year by arrows.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- DatePicker select year in popover.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- calendarContainerWidth, calendarContainerHeight.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- case very future date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- controlled datepicker reset date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- defaultDate, enableContentLeft, enableContentRight.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- input date from calendar.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- input date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- input masked date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- label, leftHelper, placeholder.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- renderFromDate.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- size=l.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- size=m.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- size=s.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- size=xs.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- stretch.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePicker -- view=default, size=xl.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- appearance=clear, firstValueError, secondValueError.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- appearance=clear, firstValueSuccess, secondValueSuccess.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- appearance=clear, hasClearDivider.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- calendarContainerWidth, calendarContainerHeight.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- controlled datepicker reset date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- dateShortcuts, dateShortcutsPlacement=left, dateShortcutsWidth=5rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- dateShortcuts, dateShortcutsPlacement=right, dateShortcutsWidth=10rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- defaultDate, enableContent.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- hintText, required, requiredPlacement=right.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- label, leftHelper, placeholder.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- renderFromDate.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/chromium/DatePicker/DatePickerRange -- stretch.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker dateShortcuts, dateShortcutsPlacement=left, dateShortcutsWidth=5rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker dateShortcuts, dateShortcutsPlacement=right, dateShortcutsWidth=10rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker select day in popover.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker select month by arrows.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker select month in popover.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker select year by arrows.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- DatePicker select year in popover.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- calendarContainerWidth, calendarContainerHeight.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- case very future date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- controlled datepicker reset date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- defaultDate, enableContentLeft, enableContentRight.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- input date from calendar.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- input date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- input masked date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- label, leftHelper, placeholder.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- renderFromDate.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- size=l.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- size=m.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- size=s.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- size=xs.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- stretch.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePicker -- view=default, size=xl.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- appearance=clear, firstValueError, secondValueError.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- appearance=clear, firstValueSuccess, secondValueSuccess.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- appearance=clear, hasClearDivider.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- calendarContainerWidth, calendarContainerHeight.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- controlled datepicker reset date.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- dateShortcuts, dateShortcutsPlacement=left, dateShortcutsWidth=5rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- dateShortcuts, dateShortcutsPlacement=right, dateShortcutsWidth=10rem.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- defaultDate, enableContent.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- hintText, required, requiredPlacement=right.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- label, leftHelper, placeholder.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- renderFromDate.snap.pngis excluded by!**/*.pngcypress/snapshots/homeds/webkit/DatePicker/DatePickerRange -- stretch.snap.pngis excluded by!**/*.png
📒 Files selected for processing (23)
packages/plasma-new-hope/src/components/Calendar/Calendar.types.tspackages/plasma-new-hope/src/components/Calendar/CalendarBase/CalendarBase.tsxpackages/plasma-new-hope/src/components/Calendar/CalendarDouble/CalendarDouble.tsxpackages/plasma-new-hope/src/components/Calendar/hoc/withRange.tsxpackages/plasma-new-hope/src/components/DatePicker/DatePicker.component-test.tsxpackages/plasma-new-hope/src/components/DatePicker/DatePicker.template-doc.mdxpackages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDate.tsxpackages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.tsxpackages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.tsutils/plasma-sb-utils/src/components/DatePicker/meta.tswebsite/plasma-b2c-docs/docs/components/DatePicker.mdxwebsite/plasma-giga-docs/docs/components/DatePicker.mdxwebsite/plasma-homeds-docs/docs/components/DatePicker.mdxwebsite/plasma-web-docs/docs/components/DatePicker.mdxwebsite/sdds-bizcom-docs/docs/components/DatePicker.mdxwebsite/sdds-cs-docs/docs/components/DatePicker.mdxwebsite/sdds-dfa-docs/docs/components/DatePicker.mdxwebsite/sdds-finai-docs/docs/components/DatePicker.mdxwebsite/sdds-insol-docs/docs/components/DatePicker.mdxwebsite/sdds-netology-docs/docs/components/DatePicker.mdxwebsite/sdds-platform-ai-docs/docs/components/DatePicker.mdxwebsite/sdds-scan-docs/docs/components/DatePicker.mdxwebsite/sdds-serv-docs/docs/components/DatePicker.mdx
✅ Files skipped from review due to trivial changes (12)
- packages/plasma-new-hope/src/components/Calendar/CalendarDouble/CalendarDouble.tsx
- website/sdds-insol-docs/docs/components/DatePicker.mdx
- website/plasma-giga-docs/docs/components/DatePicker.mdx
- website/plasma-web-docs/docs/components/DatePicker.mdx
- website/sdds-scan-docs/docs/components/DatePicker.mdx
- website/sdds-finai-docs/docs/components/DatePicker.mdx
- packages/plasma-new-hope/src/components/DatePicker/DatePicker.template-doc.mdx
- website/sdds-dfa-docs/docs/components/DatePicker.mdx
- website/plasma-b2c-docs/docs/components/DatePicker.mdx
- website/plasma-homeds-docs/docs/components/DatePicker.mdx
- website/sdds-cs-docs/docs/components/DatePicker.mdx
- website/sdds-serv-docs/docs/components/DatePicker.mdx
🚧 Files skipped from review as they are similar to previous changes (6)
- packages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.types.ts
- packages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.tsx
- website/sdds-netology-docs/docs/components/DatePicker.mdx
- website/sdds-platform-ai-docs/docs/components/DatePicker.mdx
- packages/plasma-new-hope/src/components/DatePicker/DatePicker.component-test.tsx
- packages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDate.tsx
Core
DatePickerRange
includeEdgeDatesWhat/why changed
includeEdgeDates📦 Published PR as canary version:
Canary Versions✨ Test out this PR locally via:
npm install @salutejs/plasma-asdk@0.378.0-canary.2814.26576874879.0 npm install @salutejs/plasma-b2c@1.620.0-canary.2814.26576874879.0 npm install @salutejs/plasma-core@1.228.0-canary.2814.26576874879.0 npm install @salutejs/plasma-giga@0.347.0-canary.2814.26576874879.0 npm install @salutejs/plasma-homeds@0.347.0-canary.2814.26576874879.0 npm install @salutejs/plasma-hope@1.374.0-canary.2814.26576874879.0 npm install @salutejs/plasma-icons@1.239.0-canary.2814.26576874879.0 npm install @salutejs/plasma-new-hope@0.364.0-canary.2814.26576874879.0 npm install @salutejs/plasma-tokens-b2b@1.56.0-canary.2814.26576874879.0 npm install @salutejs/plasma-tokens-b2c@0.67.0-canary.2814.26576874879.0 npm install @salutejs/plasma-tokens-web@1.71.0-canary.2814.26576874879.0 npm install @salutejs/plasma-tokens@1.140.0-canary.2814.26576874879.0 npm install @salutejs/plasma-typo@0.44.0-canary.2814.26576874879.0 npm install @salutejs/plasma-ui@1.350.0-canary.2814.26576874879.0 npm install @salutejs/plasma-web@1.622.0-canary.2814.26576874879.0 npm install @salutejs/sdds-bizcom@0.352.0-canary.2814.26576874879.0 npm install @salutejs/sdds-cs@0.356.0-canary.2814.26576874879.0 npm install @salutejs/sdds-dfa@0.350.0-canary.2814.26576874879.0 npm install @salutejs/sdds-finai@0.343.0-canary.2814.26576874879.0 npm install @salutejs/sdds-insol@0.347.0-canary.2814.26576874879.0 npm install @salutejs/sdds-netology@0.351.0-canary.2814.26576874879.0 npm install @salutejs/sdds-os@0.22.0-canary.2814.26576874879.0 npm install @salutejs/sdds-platform-ai@0.351.0-canary.2814.26576874879.0 npm install @salutejs/sdds-sbcom@0.352.0-canary.2814.26576874879.0 npm install @salutejs/sdds-scan@0.350.0-canary.2814.26576874879.0 npm install @salutejs/sdds-serv@0.351.0-canary.2814.26576874879.0 npm install @salutejs/core-themes@0.31.0-canary.2814.26576874879.0 npm install @salutejs/plasma-themes@0.52.0-canary.2814.26576874879.0 npm install @salutejs/sdds-themes@0.67.0-canary.2814.26576874879.0 npm install @salutejs/sdds-api-tests@0.9.0-canary.2814.26576874879.0 npm install @salutejs/plasma-cy-utils@0.158.0-canary.2814.26576874879.0 npm install @salutejs/plasma-sb-utils@0.228.0-canary.2814.26576874879.0 npm install @salutejs/plasma-tokens-utils@0.52.0-canary.2814.26576874879.0 # or yarn add @salutejs/plasma-asdk@0.378.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-b2c@1.620.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-core@1.228.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-giga@0.347.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-homeds@0.347.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-hope@1.374.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-icons@1.239.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-new-hope@0.364.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-tokens-b2b@1.56.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-tokens-b2c@0.67.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-tokens-web@1.71.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-tokens@1.140.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-typo@0.44.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-ui@1.350.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-web@1.622.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-bizcom@0.352.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-cs@0.356.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-dfa@0.350.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-finai@0.343.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-insol@0.347.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-netology@0.351.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-os@0.22.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-platform-ai@0.351.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-sbcom@0.352.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-scan@0.350.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-serv@0.351.0-canary.2814.26576874879.0 yarn add @salutejs/core-themes@0.31.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-themes@0.52.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-themes@0.67.0-canary.2814.26576874879.0 yarn add @salutejs/sdds-api-tests@0.9.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-cy-utils@0.158.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-sb-utils@0.228.0-canary.2814.26576874879.0 yarn add @salutejs/plasma-tokens-utils@0.52.0-canary.2814.26576874879.0Summary by CodeRabbit
New Features
min,max, andincludeEdgeDateswith improved millisecond-precision boundary handling.Documentation
Tests