diff --git a/README.md b/README.md index 180aba41..a9311ae9 100644 --- a/README.md +++ b/README.md @@ -138,6 +138,7 @@ export default function ReadMeExampleSingle() { // }} // onChange={} // same props as onConfirm but triggered without confirmed by user // saveLabel="Save" // optional + // saveLabelDisabled={true} // optional, default is false // uppercase={false} // optional, default is true // label="Select date" // optional // animationType="slide" // optional, default is 'slide' on ios/android and 'none' on web @@ -194,6 +195,7 @@ export default function ReadMeExampleRange() { // }} // onChange={} // same props as onConfirm but triggered without confirmed by user // saveLabel="Save" // optional + // saveLabelDisabled={true} // optional, default is false // uppercase={false} // optional, default is true // label="Select period" // optional // startLabel="From" // optional @@ -251,6 +253,7 @@ export default function ReadMeExampleMultiple() { // uppercase={false} // optional, default is true // label="Select period" // optional // startLabel="From" // optional + // saveLabelDisabled={true} // optional, default is false // endLabel="To" // optional // animationType="slide" // optional, default is slide on ios/android and none on web /> diff --git a/example/src/ReadMeExampleMultiple.tsx b/example/src/ReadMeExampleMultiple.tsx index 6dc50b57..2494ff8b 100644 --- a/example/src/ReadMeExampleMultiple.tsx +++ b/example/src/ReadMeExampleMultiple.tsx @@ -37,7 +37,7 @@ export default function ReadMeExampleMultiple() { // }} // locale={'nl'} // optional // saveLabel="Save" // optional - // uppercase={false} // optional, default is true + // saveLabelDisabled={true} // optional, default is false // uppercase={false} // optional, default is true // label="Select period" // optional // startLabel="From" // optional // endLabel="To" // optional diff --git a/example/src/ReadMeExampleRange.tsx b/example/src/ReadMeExampleRange.tsx index 0d6c470c..e527c93f 100644 --- a/example/src/ReadMeExampleRange.tsx +++ b/example/src/ReadMeExampleRange.tsx @@ -44,6 +44,7 @@ export default function ReadMeExampleRange() { // onChange={} // same props as onConfirm but triggered without confirmed by user // locale={'nl'} // optional // saveLabel="Save" // optional + // saveLabelDisabled={true} // optional, default is false // uppercase={false} // optional, default is true // label="Select period" // optional // startLabel="From" // optional diff --git a/example/src/ReadMeExampleSingle.tsx b/example/src/ReadMeExampleSingle.tsx index a1ab002d..9909da44 100644 --- a/example/src/ReadMeExampleSingle.tsx +++ b/example/src/ReadMeExampleSingle.tsx @@ -37,6 +37,7 @@ export default function ReadMeExampleSingle() { // }} // onChange={} // same props as onConfirm but triggered without confirmed by user // saveLabel="Save" // optional + // saveLabelDisabled={true} // optional, default is false // uppercase={false} // optional, default is true // label="Select date" // optional // animationType="slide" // optional, default is 'slide' on ios/android and 'none' on web diff --git a/src/Date/DatePickerModalContent.tsx b/src/Date/DatePickerModalContent.tsx index 3f5fa180..7c7ab81e 100644 --- a/src/Date/DatePickerModalContent.tsx +++ b/src/Date/DatePickerModalContent.tsx @@ -142,6 +142,7 @@ export function DatePickerModalContent( onSave={onInnerConfirm} onDismiss={onDismiss} saveLabel={props.saveLabel} + saveLabelDisabled={props.saveLabelDisabled ?? false} uppercase={props.uppercase ?? true} disableSafeTop={disableSafeTop} /> diff --git a/src/Date/DatePickerModalHeader.tsx b/src/Date/DatePickerModalHeader.tsx index 7f7e7e49..88024b2e 100644 --- a/src/Date/DatePickerModalHeader.tsx +++ b/src/Date/DatePickerModalHeader.tsx @@ -8,6 +8,7 @@ import { getTranslation } from '../translations/utils' export interface DatePickerModalHeaderProps { disableSafeTop?: boolean saveLabel?: string + saveLabelDisabled?: boolean uppercase?: boolean onDismiss: () => void onSave: () => void @@ -44,6 +45,7 @@ export default function DatePickerModalHeader(