@react-aria/datepicker
Advanced tools
Comparing version 3.0.0-nightly-dcc0752f8-241031 to 3.0.0-nightly-e14088a7e-241204
@@ -43,3 +43,3 @@ var $4acc2f407c169e55$exports = require("./useDateField.main.js"); | ||
function $20f695b1b69e6b9e$export$12fd5f0e9f4bb192(props, state, ref) { | ||
var _state_value, _state_value1; | ||
var _state_value, _state_value1, _state_dateRange; | ||
let stringFormatter = (0, $Xt1Bd$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($c1905b78f6d2f5bf$exports))), '@react-aria/datepicker'); | ||
@@ -109,2 +109,3 @@ let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation; | ||
let endFieldValidation = (0, $Xt1Bd$react.useRef)((0, $Xt1Bd$reactstatelyform.DEFAULT_VALIDATION_RESULT)); | ||
var _state_value_start, _state_value_end; | ||
return { | ||
@@ -148,3 +149,3 @@ groupProps: (0, $Xt1Bd$reactariautils.mergeProps)(domProps, groupProps, fieldProps, descProps, focusWithinProps, { | ||
...commonFieldProps, | ||
value: (_state_value = state.value) === null || _state_value === void 0 ? void 0 : _state_value.start, | ||
value: (_state_value_start = (_state_value = state.value) === null || _state_value === void 0 ? void 0 : _state_value.start) !== null && _state_value_start !== void 0 ? _state_value_start : null, | ||
onChange: (start)=>state.setDateTime('start', start), | ||
@@ -167,3 +168,3 @@ autoFocus: props.autoFocus, | ||
...commonFieldProps, | ||
value: (_state_value1 = state.value) === null || _state_value1 === void 0 ? void 0 : _state_value1.end, | ||
value: (_state_value_end = (_state_value1 = state.value) === null || _state_value1 === void 0 ? void 0 : _state_value1.end) !== null && _state_value_end !== void 0 ? _state_value_end : null, | ||
onChange: (end)=>state.setDateTime('end', end), | ||
@@ -186,3 +187,3 @@ name: props.endName, | ||
autoFocus: true, | ||
value: state.dateRange, | ||
value: ((_state_dateRange = state.dateRange) === null || _state_dateRange === void 0 ? void 0 : _state_dateRange.start) && state.dateRange.end ? state.dateRange : null, | ||
onChange: state.setDateRange, | ||
@@ -189,0 +190,0 @@ minValue: props.minValue, |
@@ -37,3 +37,3 @@ import {focusManagerSymbol as $16f0b7bb276bc17e$export$7b3062cd49e80452, roleSymbol as $16f0b7bb276bc17e$export$300019f83c56d282} from "./useDateField.module.js"; | ||
function $887cac91b7cc8801$export$12fd5f0e9f4bb192(props, state, ref) { | ||
var _state_value, _state_value1; | ||
var _state_value, _state_value1, _state_dateRange; | ||
let stringFormatter = (0, $eIQ1H$useLocalizedStringFormatter)((0, ($parcel$interopDefault($eIQ1H$intlStringsmodulejs))), '@react-aria/datepicker'); | ||
@@ -103,2 +103,3 @@ let { isInvalid: isInvalid, validationErrors: validationErrors, validationDetails: validationDetails } = state.displayValidation; | ||
let endFieldValidation = (0, $eIQ1H$useRef)((0, $eIQ1H$DEFAULT_VALIDATION_RESULT)); | ||
var _state_value_start, _state_value_end; | ||
return { | ||
@@ -142,3 +143,3 @@ groupProps: (0, $eIQ1H$mergeProps)(domProps, groupProps, fieldProps, descProps, focusWithinProps, { | ||
...commonFieldProps, | ||
value: (_state_value = state.value) === null || _state_value === void 0 ? void 0 : _state_value.start, | ||
value: (_state_value_start = (_state_value = state.value) === null || _state_value === void 0 ? void 0 : _state_value.start) !== null && _state_value_start !== void 0 ? _state_value_start : null, | ||
onChange: (start)=>state.setDateTime('start', start), | ||
@@ -161,3 +162,3 @@ autoFocus: props.autoFocus, | ||
...commonFieldProps, | ||
value: (_state_value1 = state.value) === null || _state_value1 === void 0 ? void 0 : _state_value1.end, | ||
value: (_state_value_end = (_state_value1 = state.value) === null || _state_value1 === void 0 ? void 0 : _state_value1.end) !== null && _state_value_end !== void 0 ? _state_value_end : null, | ||
onChange: (end)=>state.setDateTime('end', end), | ||
@@ -180,3 +181,3 @@ name: props.endName, | ||
autoFocus: true, | ||
value: state.dateRange, | ||
value: ((_state_dateRange = state.dateRange) === null || _state_dateRange === void 0 ? void 0 : _state_dateRange.start) && state.dateRange.end ? state.dateRange : null, | ||
onChange: state.setDateRange, | ||
@@ -183,0 +184,0 @@ minValue: props.minValue, |
{ | ||
"name": "@react-aria/datepicker", | ||
"version": "3.0.0-nightly-dcc0752f8-241031", | ||
"version": "3.0.0-nightly-e14088a7e-241204", | ||
"description": "Spectrum UI components in React", | ||
@@ -25,24 +25,24 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@internationalized/date": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@internationalized/number": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@internationalized/string": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-aria/focus": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-aria/form": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-aria/i18n": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-aria/interactions": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-aria/label": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-aria/spinbutton": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-aria/utils": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-stately/datepicker": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-stately/form": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-types/button": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-types/calendar": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-types/datepicker": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-types/dialog": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@react-types/shared": "^3.0.0-nightly-dcc0752f8-241031", | ||
"@internationalized/date": "^3.0.0-nightly-e14088a7e-241204", | ||
"@internationalized/number": "^3.0.0-nightly-e14088a7e-241204", | ||
"@internationalized/string": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-aria/focus": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-aria/form": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-aria/i18n": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-aria/interactions": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-aria/label": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-aria/spinbutton": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-aria/utils": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-stately/datepicker": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-stately/form": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-types/button": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-types/calendar": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-types/datepicker": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-types/dialog": "^3.0.0-nightly-e14088a7e-241204", | ||
"@react-types/shared": "^3.0.0-nightly-e14088a7e-241204", | ||
"@swc/helpers": "^0.5.0" | ||
}, | ||
"peerDependencies": { | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0", | ||
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0" | ||
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1", | ||
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1" | ||
}, | ||
@@ -52,3 +52,3 @@ "publishConfig": { | ||
}, | ||
"stableVersion": "3.11.4" | ||
"stableVersion": "3.12.0" | ||
} |
@@ -17,2 +17,3 @@ /* | ||
import {createFocusManager} from '@react-aria/focus'; | ||
import {DateRange, RangeCalendarProps} from '@react-types/calendar'; | ||
import {DateRangePickerState} from '@react-stately/datepicker'; | ||
@@ -25,3 +26,2 @@ import {DEFAULT_VALIDATION_RESULT, mergeValidation, privateValidationStateProp} from '@react-stately/form'; | ||
import intlMessages from '../intl/*.json'; | ||
import {RangeCalendarProps} from '@react-types/calendar'; | ||
import {useDatePickerGroup} from './useDatePickerGroup'; | ||
@@ -173,3 +173,3 @@ import {useField} from '@react-aria/label'; | ||
...commonFieldProps, | ||
value: state.value?.start, | ||
value: state.value?.start ?? null, | ||
onChange: start => state.setDateTime('start', start), | ||
@@ -192,3 +192,3 @@ autoFocus: props.autoFocus, | ||
...commonFieldProps, | ||
value: state.value?.end, | ||
value: state.value?.end ?? null, | ||
onChange: end => state.setDateTime('end', end), | ||
@@ -211,3 +211,3 @@ name: props.endName, | ||
autoFocus: true, | ||
value: state.dateRange, | ||
value: state.dateRange?.start && state.dateRange.end ? state.dateRange as DateRange : null, | ||
onChange: state.setDateRange, | ||
@@ -214,0 +214,0 @@ minValue: props.minValue, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
537111
6481
Updated@internationalized/date@^3.0.0-nightly-e14088a7e-241204
Updated@internationalized/number@^3.0.0-nightly-e14088a7e-241204
Updated@internationalized/string@^3.0.0-nightly-e14088a7e-241204
Updated@react-aria/interactions@^3.0.0-nightly-e14088a7e-241204
Updated@react-aria/spinbutton@^3.0.0-nightly-e14088a7e-241204
Updated@react-stately/datepicker@^3.0.0-nightly-e14088a7e-241204
Updated@react-types/calendar@^3.0.0-nightly-e14088a7e-241204
Updated@react-types/datepicker@^3.0.0-nightly-e14088a7e-241204