Topic: How to set options dynamically in mdb date picker

marami pro asked 5 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 5 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