Topic: Change disabled dates in a picker

Ramirez Ramos priority asked 7 years ago


Hi,Is there any way to change disabled dates in a picker once pickadate has already created? Or is there any way to destroy and create it again?Thank you.

Mirosław Stasiak free answered 7 years ago


Hi,

Yes, you can do it. Check this example:

picker.set('disable', [

// Using a collection of arrays formatted as [YEAR,MONTH,DATE]
  [2016,9,3], [2016,9,9], [2016,9,20],

// Using JavaScript Date objects
  new Date(2015,9,13), new Date(2015,9,24)

// Using integers as the days of the week (1 to 7)
  1, 4, 7,

// Using a range object with a “from” and “to” property
  { from: [2016,2,14], to: [2016,2,27] }
])

picker.set('enable', [
  [2016,9,9],
  [2016,9,13],
  new Date(2015,9,20),
  4,
  { from: [2016,2,24], to: [2016,2,27] }
])

Regards,


Ramirez Ramos priority commented 7 years ago

I have something like that: $('#myPicker').pickadate({ "disable":[1,2,3] }); But I don't know how to use it. I have tried following examples but don't work $('#myPicker').set(...) $('#myPicker').picker.set(...) $('#myPicker').pickerDate.set(...) $('#myPicker').pickerDate().set(...) Thank you


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: Priority
  • Premium support: Yes
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No
Tags