259
Views
8
Comments
RichWidgets\Input_Calendar : Set Min Date
Question

Hello Guys,

I need to set mindate for my RichWidgets\Input_Calendar widget. I am using Traditional Web. I can not use Datepicker cause this widget is using all over the places in the project.

Please suggest if i can set mindate with this widget. 

Thanks in advance.


2021-06-01 05-56-33
Komal Kumbhar

Hi Neeraj,

You can set it's min year here,

Regards,

Komal

UserImage.jpg
Neeraj

Hello Komal,

Min year will only allow me to set year (e.g 2021,2020) but I want to set Min date like (20 April 2020) .

How I can achieve this ?


2021-04-17 09-53-48
José Gonçalves

Hi Neeraj,

Unlike Datepicker, Input_Calendar allows you to the select only the min year.

You would have to change the JS in the widget I guess.

Regards

UserImage.jpg
Neeraj

Hello Jose,

Can you suggest what should I change in JS ? 

2021-04-17 09-53-48
José Gonçalves

In the variable declaration you have the start and end years:

 this.minYear = 1970;

 this.maxYear = 2050;

You would have to change this to dates and apply accordingly all over the code for this variables.

UserImage.jpg
Neeraj

If I change in widget JS then I have to change these MinYear prop everywhere in Project.

I am trying to escape from changing on multiple places

2021-04-17 09-53-48
José Gonçalves

I understand and agree changing the widget is not the best solution.

You should check for other widgets with that feature already implemented.

2026-02-26 06-29-24
Rahul
 
MVP

Hi Neeraj,

Use this type of way it will help you-



Hope this will help you.

Regards

Rahul

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.