puncoz-official / nepali-datepicker-reactjs

Nepali Datepicker (Bikram Sambat) as a ReactJS component
https://puncoz-official.github.io/nepali-datepicker-reactjs/
Other
28 stars 44 forks source link

Current date set by default .I just want to set placeholder "मिति चयन गर्नुहोस्" by default ?How to do that #19

Open MhjnSamir opened 3 years ago

tamangsuresh commented 2 years ago

Is there any documentation about this?

rajivchaulagain commented 8 months ago

I think the package is automatically setting the default value of today if we pass value='' empty string so , I think we have to add a wrapper class and control it our way rather that using their default value if we want like below example in mantine ui component.

export const NepaliDatePickerInput = ({handleChange , ...otherProps}:any) => {
  return (
    <InputBase
      component={NepaliDatePicker}
      options={{ calenderLocale: 'en', valueLocale: 'en' }}
      style={{ border: 0 }}
      className={classes.nepaliDatePicker}
      {...otherProps}
    />
  );
};