cynx-lib 1.3.31 → 1.3.32
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.
package/package.json
CHANGED
|
@@ -327,7 +327,7 @@ export function DatePicker({ value, onChange, label, placeholder = 'Select date'
|
|
|
327
327
|
return (
|
|
328
328
|
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 4, padding: '4px 0' }}>
|
|
329
329
|
{MONTHS.map((name, i) => {
|
|
330
|
-
const sel =
|
|
330
|
+
const sel = valDate && valDate.getFullYear() === y && valDate.getMonth() === i;
|
|
331
331
|
const monthStart = new Date(y, i, 1);
|
|
332
332
|
const monthEnd = new Date(y, i + 1, 0, 23, 59, 59, 999);
|
|
333
333
|
const disMin = minD && monthEnd < new Date(new Date(minD).setHours(0, 0, 0, 0));
|
|
@@ -377,7 +377,7 @@ export function DatePicker({ value, onChange, label, placeholder = 'Select date'
|
|
|
377
377
|
return (
|
|
378
378
|
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(3, 1fr)', gap: 4, padding: '4px 0' }}>
|
|
379
379
|
{years.map(yr => {
|
|
380
|
-
const sel =
|
|
380
|
+
const sel = valDate && valDate.getFullYear() === yr;
|
|
381
381
|
const yrStart = new Date(yr, 0, 1);
|
|
382
382
|
const yrEnd = new Date(yr, 11, 31, 23, 59, 59, 999);
|
|
383
383
|
const disMin = minD && yrEnd < new Date(new Date(minD).setHours(0, 0, 0, 0));
|