Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change year BC to BE #811

Open
shinnachot opened this issue May 8, 2024 · 0 comments
Open

How to change year BC to BE #811

shinnachot opened this issue May 8, 2024 · 0 comments

Comments

@shinnachot
Copy link

shinnachot commented May 8, 2024

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant