How to change year BC to BE
shinnachot opened this issue · comments
Shinnachot Dejtanapong commented
Describe the bug
I try to add year in moment +543 but i cannot pick a date on 29 february 2567
Expected behavior
date picker should be select a date on 29 february 2567
import React from "react";
import DatePicker from "react-native-date-picker";
import { translate } from "../../plugins/i18n/action";
import { toBuddhistYear } from "../../utils";
import moment from "moment";
import { DatePickerProps } from "./datepicker.type";
import { memo } from "../../hooks/memo";
const DatePick: React.FC<DatePickerProps> = ({
dateVisibility = false,
selectDate = new Date(),
onConfirm = () => {},
onCancel = () => {},
}) => {
return (
<DatePicker
modal
open={dateVisibility}
date={selectDate}
mode="date"
locale="th"
maximumDate={new Date()}
onConfirm={onConfirm}
onCancel={onCancel}
/>
);
};
export default memo(DatePick);
Smartphone (please complete the following information):
- OS: [Android]
- React Native version "0.72.6"
- react-native-date-picker version "^4.3.3"