Holiday Notice: Support will be provided on a limited scale from December 24th, 2024, to January 2nd, 2025. Happy holidays and a wonderful New Year!


Topic: How to set options dynamically in mdb date picker

marami pro asked 6 years ago


Mai I know how to set / change options of mdb date picker? I tried the following code:
this.MyDatePickerOptions.disableDateRanges = [{begin: {year: 1, month: 1, day: 1}, end: {year: 2018, month: 10, day: 1}}];

Damian Gemza staff answered 6 years ago


Dear marami, You can achieve your desired behavior with this code:
public myDatePickerOptions: IMyOptions = {

};

ngOnInit() {

this.myDatePickerOptions.disableDateRanges= [{begin: {year:1, month:1, day:1}, end: {year:2018, month:11, day:1}}];

}
Best Regards, Damian

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 6.2.3
  • Device: Lenovo
  • Browser: Mozilla Firefox
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No