Need to make List of year and month scrollable for date picker

Hi All,

          I am using Date Picker so that I can apply some validations on Date selection and I am restricting user from selecting Invalid dates. But the list of year and month is not scrollable. How can I do it, please suggest me any way if it's possible.

Hello  Ajay,

Is it possible to share the OML because it is working at my end.

Regards,

Pavan R

Sorry pavan but I can't share the oml

Hello Ajay,

In this case, can you give the date picker advance property as :

"{ yearRange: [1921, 2021] }"

In this way you can also write :
"{ yearRange: ["+Year(AddYears(CurrDate(),-70))+","+Year(CurrDate())+" ] }"

 Demo URL for Above advance property i.e. year range: [1952(2022-70), 2022]


hope this will helps you ..! 

Thanks and Regards,

Akshay Deshpande.

Hi @Akshay Deshpande šŸš€ , if you try setting MinDate then it's not scrollable.

@ajay gautam, if you are setting mindate date than you forcefully restricting to the datepicker 

don't show the years before mindate() like wise so its not possible to scroll that time (this widget is behave like this )

if you want both min date as well as max date  and scroller also 

so you need to do customize your code remove the Min date and max date so scroller will work 

and on change of that input do the validation for min and max date and check that in that 

and in the year range (you will also able to give the range of years)


Thanks and Regards,

Akshay Deshpande




Hi @Ajay Gautam 

The same date picker is working fine for me , please check if you are added any additional CSS for that date picker widget. Here I have added the OML hope it will help you .  

Regards,

Seetha. 

DatePicker.oml

Hi @Seetha Ganesan , could you please try this by setting any MinDate. If we set any MinDate for DatePicker then it's not scrollable

And that is what I have mentioned in my post that I am doing some validations for date by using MinDate

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