@react-stately/calendar
Advanced tools
Comparing version 3.0.0-nightly.1383 to 3.0.0-nightly.1386
@@ -87,3 +87,3 @@ var $iUi8f$internationalizeddate = require("@internationalized/date"); | ||
]); | ||
let { locale: locale , createCalendar: createCalendar , timeZone: timeZone = resolvedOptions.timeZone , visibleDuration: visibleDuration = { | ||
let { locale: locale , createCalendar: createCalendar , visibleDuration: visibleDuration = { | ||
months: 1 | ||
@@ -102,2 +102,7 @@ } , minValue: minValue , maxValue: maxValue , selectionAlignment: selectionAlignment } = props; | ||
]); | ||
let timeZone = $iUi8f$react.useMemo(()=>value && 'timeZone' in value ? value.timeZone : resolvedOptions.timeZone | ||
, [ | ||
value, | ||
resolvedOptions.timeZone | ||
]); | ||
let defaultDate = $iUi8f$react.useMemo(()=>calendarDateValue || $da856c074c1b8d5f$export$4f5203c0d889109e($iUi8f$internationalizeddate.toCalendar($iUi8f$internationalizeddate.today(timeZone), calendar), minValue, maxValue) | ||
@@ -104,0 +109,0 @@ , [ |
@@ -71,3 +71,3 @@ import {toCalendar as $7F3MR$toCalendar, toCalendarDate as $7F3MR$toCalendarDate, today as $7F3MR$today, GregorianCalendar as $7F3MR$GregorianCalendar, isSameDay as $7F3MR$isSameDay, startOfYear as $7F3MR$startOfYear, startOfMonth as $7F3MR$startOfMonth, startOfWeek as $7F3MR$startOfWeek, maxDate as $7F3MR$maxDate, minDate as $7F3MR$minDate} from "@internationalized/date"; | ||
]); | ||
let { locale: locale , createCalendar: createCalendar , timeZone: timeZone = resolvedOptions.timeZone , visibleDuration: visibleDuration = { | ||
let { locale: locale , createCalendar: createCalendar , visibleDuration: visibleDuration = { | ||
months: 1 | ||
@@ -86,2 +86,7 @@ } , minValue: minValue , maxValue: maxValue , selectionAlignment: selectionAlignment } = props; | ||
]); | ||
let timeZone = $7F3MR$useMemo(()=>value && 'timeZone' in value ? value.timeZone : resolvedOptions.timeZone | ||
, [ | ||
value, | ||
resolvedOptions.timeZone | ||
]); | ||
let defaultDate = $7F3MR$useMemo(()=>calendarDateValue || $5415b3b7a99138bd$export$4f5203c0d889109e($7F3MR$toCalendar($7F3MR$today(timeZone), calendar), minValue, maxValue) | ||
@@ -88,0 +93,0 @@ , [ |
{ | ||
"name": "@react-stately/calendar", | ||
"version": "3.0.0-nightly.1383+df9eb3253", | ||
"version": "3.0.0-nightly.1386+7e8a7f696", | ||
"description": "Spectrum UI components in React", | ||
@@ -21,8 +21,8 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@internationalized/date": "3.0.0-nightly.3074+df9eb3253", | ||
"@react-aria/i18n": "3.0.0-nightly.1383+df9eb3253", | ||
"@react-stately/utils": "3.0.0-nightly.1383+df9eb3253", | ||
"@react-types/calendar": "3.0.0-nightly.1383+df9eb3253", | ||
"@react-types/datepicker": "3.0.0-nightly.1383+df9eb3253", | ||
"@react-types/shared": "3.0.0-nightly.1383+df9eb3253", | ||
"@internationalized/date": "3.0.0-nightly.3077+7e8a7f696", | ||
"@react-aria/i18n": "3.0.0-nightly.1386+7e8a7f696", | ||
"@react-stately/utils": "3.0.0-nightly.1386+7e8a7f696", | ||
"@react-types/calendar": "3.0.0-nightly.1386+7e8a7f696", | ||
"@react-types/datepicker": "3.0.0-nightly.1386+7e8a7f696", | ||
"@react-types/shared": "3.0.0-nightly.1386+7e8a7f696", | ||
"date-fns": "^1.30.1" | ||
@@ -36,3 +36,3 @@ }, | ||
}, | ||
"gitHead": "df9eb3253328c2aee23de4ff3d48c63b4d8222e8" | ||
"gitHead": "7e8a7f69685139b3574453b424a5ad4c8fa4e808" | ||
} |
@@ -43,3 +43,2 @@ /* | ||
createCalendar, | ||
timeZone = resolvedOptions.timeZone, | ||
visibleDuration = {months: 1}, | ||
@@ -55,2 +54,3 @@ minValue, | ||
let calendarDateValue = useMemo(() => value ? toCalendar(toCalendarDate(value), calendar) : null, [value, calendar]); | ||
let timeZone = useMemo(() => value && 'timeZone' in value ? value.timeZone : resolvedOptions.timeZone, [value, resolvedOptions.timeZone]); | ||
let defaultDate = useMemo(() => calendarDateValue || constrainValue(toCalendar(today(timeZone), calendar), minValue, maxValue), [calendarDateValue, timeZone, calendar, minValue, maxValue]); | ||
@@ -57,0 +57,0 @@ let [startDate, setStartDate] = useState(() => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
127584
1203