Skip to content

Commit ea6a10e

Browse files
committed
Set defaultMinDate to 0001-01-01 local time, not UTC time
1 parent accd49a commit ea6a10e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/DateInput.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ import {
1717
import { isMaxDate, isMinDate } from './shared/propTypes';
1818
import { between } from './shared/utils';
1919

20-
const defaultMinDate = new Date('0001-01-01');
20+
const defaultMinDate = new Date();
21+
defaultMinDate.setFullYear(1, 0, 1);
22+
defaultMinDate.setHours(0, 0, 0, 0);
2123
const defaultMaxDate = new Date(8.64e15);
2224
const allViews = ['century', 'decade', 'year', 'month'];
2325
const allValueTypes = [...allViews.slice(1), 'day'];

0 commit comments

Comments
 (0)