DateRangePicker is a reusable component for shadcn using Radix UI and Tailwind CSS. Includes preset date ranges, text entry, calendar selection and date comparison
Hi firstly let me say, amazing component, i love it.
I noticed in Console.logs
<DateRangePicker onUpdate={(values) => { const { range } = values; console.log( Selected Date Range: From ${range.from.toISOString()} to ${range.to?.toISOString()} );
Selected Date Range: From 2024-04-01T23:00:00.000Z to 2024-04-01T23:00:00.000Z
This is what i get back when i select, Today,
Selected Date Range: From 2024-03-31T23:00:00.000Z to 2024-03-31T23:00:00.000Z
This is what i get back when i select Yesterday,
Selected Date Range: From 2024-03-31T00:00:00.000Z to 2024-04-01T23:00:00.000Z
This is what i get back when i select Last week.
Everything works expect Today & Yesterday, the Console.logs shows a specific moment for Today & Yesterday rather then capturing the entire day
Hi firstly let me say, amazing component, i love it.
I noticed in Console.logs
<DateRangePicker onUpdate={(values) => { const { range } = values; console.log(
Selected Date Range: From ${range.from.toISOString()} to ${range.to?.toISOString()});
Selected Date Range: From 2024-04-01T23:00:00.000Z to 2024-04-01T23:00:00.000Z
This is what i get back when i select, Today,
Selected Date Range: From 2024-03-31T23:00:00.000Z to 2024-03-31T23:00:00.000Z
This is what i get back when i select Yesterday,
Selected Date Range: From 2024-03-31T00:00:00.000Z to 2024-04-01T23:00:00.000Z
This is what i get back when i select Last week.
Everything works expect Today & Yesterday, the Console.logs shows a specific moment for Today & Yesterday rather then capturing the entire day