Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,31 +568,6 @@ Set the negative button label and text color.
<RNDateTimePicker negativeButton={{label: 'Cancel', textColor: 'red'}} />
```

#### `positiveButtonLabel` (`optional`, `Android only`, deprecated)

Changes the label of the positive button.

```js
<RNDateTimePicker positiveButtonLabel="OK!" />
```

#### `negativeButtonLabel` (`optional`, `Android only`, deprecated)

Changes the label of the negative button.

```js
<RNDateTimePicker negativeButtonLabel="Negative" />
```

#### `neutralButtonLabel` (`optional`, `Android only`, deprecated)

Allows displaying neutral button on picker dialog.
Pressing button can be observed in onChange handler as `event.type === 'neutralButtonPressed'`

```js
<RNDateTimePicker neutralButtonLabel="clear" />
```

#### `minuteInterval` (`optional`)

The interval at which minutes can be selected.
Expand Down
6 changes: 0 additions & 6 deletions src/DateTimePickerAndroid.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ function open(props: AndroidNativeProps) {
positiveButton,
negativeButton,
neutralButton,
neutralButtonLabel,
positiveButtonLabel,
negativeButtonLabel,
testID,
firstDayOfWeek,
title,
Expand All @@ -63,17 +60,14 @@ function open(props: AndroidNativeProps) {
try {
const dialogButtons = {
positive: {
label: positiveButtonLabel,
...positiveButton,
textColor: processColor(positiveButton?.textColor),
},
neutral: {
label: neutralButtonLabel,
...neutralButton,
textColor: processColor(neutralButton?.textColor),
},
negative: {
label: negativeButtonLabel,
...negativeButton,
textColor: processColor(negativeButton?.textColor),
},
Expand Down
10 changes: 0 additions & 10 deletions src/androidUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,16 +121,6 @@ function validateAndroidProps(props: AndroidNativeProps) {
!(display === ANDROID_DISPLAY.clock && mode === ANDROID_MODE.date),
`display: ${display} and mode: ${mode} cannot be used together.`,
);
if (
props?.positiveButtonLabel !== undefined ||
props?.negativeButtonLabel !== undefined ||
props?.neutralButtonLabel !== undefined
) {
console.warn(
'positiveButtonLabel, negativeButtonLabel and neutralButtonLabel are deprecated.' +
'Use positive / negative / neutralButton prop instead.',
);
}
}

function validateMaterial3PropsNotUsed(props: AndroidNativeProps) {
Expand Down
6 changes: 0 additions & 6 deletions src/datetimepicker.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ export default function RNDateTimePickerAndroid(
positiveButton,
negativeButton,
neutralButton,
positiveButtonLabel,
negativeButtonLabel,
neutralButtonLabel,
testID,
firstDayOfWeek,
title,
Expand Down Expand Up @@ -64,9 +61,6 @@ export default function RNDateTimePickerAndroid(
positiveButton,
negativeButton,
neutralButton,
positiveButtonLabel,
negativeButtonLabel,
neutralButtonLabel,
testID,
firstDayOfWeek,
title,
Expand Down
12 changes: 0 additions & 12 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,18 +165,6 @@ export type AndroidNativeProps = Readonly<
neutralButton?: ButtonType;
negativeButton?: ButtonType;

/**
* @deprecated use neutralButton instead
* */
neutralButtonLabel?: string;
/**
* @deprecated use positiveButton instead
* */
positiveButtonLabel?: string;
/**
* @deprecated use negativeButton instead
* */
negativeButtonLabel?: string;
/**
* Sets the first day of the week shown in the calendar
*/
Expand Down
12 changes: 0 additions & 12 deletions src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,18 +237,6 @@ export type AndroidNativeProps = $ReadOnly<{|
// Not supported in Material 3 pickers
neutralButton?: ButtonType,
negativeButton?: ButtonType,
/**
* @deprecated use neutralButton instead
* */
neutralButtonLabel?: string,
/**
* @deprecated use positiveButton instead
* */
positiveButtonLabel?: string,
/**
* @deprecated use negativeButton instead
* */
negativeButtonLabel?: string,
/**
* Sets the first day of the week shown in the calendar
*/
Expand Down
Loading