OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Repurpose DatePicker from react-dates dynamically

  • Thread starter Thread starter copenndthagen
  • Start date Start date
C

copenndthagen

Guest
I want to be able to repurpose DatePicker component from react-dates dynamically. This can be based on some configurable parameter.

e.g.

Code:
for Scenario 1, I want the DatePicker to act as a proper date picker (e.g. 2024-Jan-10)
for Scenario 2, I want the DatePicker to act as a Year and Month picker (e.g. 2024 Jan)
for Scenario 3, I want the DatePicker to act as a Year picker (e.g. 2023)

Does "react-dates" have support to achieve this?

<p>I want to be able to repurpose DatePicker component from react-dates dynamically. This can be based on some configurable parameter.</p>
<p>e.g.</p>
<pre><code>for Scenario 1, I want the DatePicker to act as a proper date picker (e.g. 2024-Jan-10)
for Scenario 2, I want the DatePicker to act as a Year and Month picker (e.g. 2024 Jan)
for Scenario 3, I want the DatePicker to act as a Year picker (e.g. 2023)
</code></pre>
<p>Does "react-dates" have support to achieve this?</p>
 

Latest posts

B
Replies
0
Views
1
Blundering Ecologist
B
Top