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

"renderYearContent" unavailable in proptypes #4750

Open
kalpesh-coditas opened this issue Apr 30, 2024 · 1 comment
Open

"renderYearContent" unavailable in proptypes #4750

kalpesh-coditas opened this issue Apr 30, 2024 · 1 comment

Comments

@kalpesh-coditas
Copy link

kalpesh-coditas commented Apr 30, 2024

I am trying customise year text and in docs "renderYearContent" prop is given to do so but actually this prop is not available in proptypes of react datepicker, is there any workaround for this ??

() => {
  const renderYearContent = (year) => {
    const tooltipText = `Tooltip for year: ${year}`;
    return <span title={tooltipText}>{year}</span>;
  };
  return (
    <DatePicker
      selected={new Date()}
      renderYearContent={renderYearContent}
      showYearPicker
      dateFormat="yyyy"
    />
  );
};
@mirus-ua
Copy link
Contributor

mirus-ua commented May 2, 2024

I hope will be handled here #4700

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

2 participants