@juspay/svelte-ui-components 2.63.0 → 2.63.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -391,6 +391,14 @@
|
|
|
391
391
|
) {
|
|
392
392
|
return preset.label === activePresetLabel;
|
|
393
393
|
}
|
|
394
|
+
// A preset was explicitly chosen this session — match it by label, not by date.
|
|
395
|
+
// Several presets can share a calendar day (e.g. "Today", "Last 30 minutes" and
|
|
396
|
+
// "Last 12 hours" all start today), so same-day matching would light up all of
|
|
397
|
+
// them at once. selectedPresetLabel is cleared on a direct calendar click, so the
|
|
398
|
+
// date-based fallbacks below still drive highlighting for manual selections.
|
|
399
|
+
if (selectedPresetLabel !== null) {
|
|
400
|
+
return preset.label === selectedPresetLabel;
|
|
401
|
+
}
|
|
394
402
|
if (mode === 'single') {
|
|
395
403
|
if (draftValue === null) {
|
|
396
404
|
return false;
|