material icon indicating copy to clipboard operation
material copied to clipboard

Update or destroy instance of date picker

Open halfpastfouram opened this issue 6 years ago • 1 comments

It seems that once you've created an instance of a datepicker you cannot update or destroy it.

For instance: I need to be able to update it by changing the min or max selectable date. This seems to be impossible right now.

Maybe, after the plugin is updated add the same support that the base plugin provides. This way all properties can be set like so:

// Using arrays formatted as [YEAR,MONTH,DATE].
picker.set('max', [2015,3,20])

// Using JavaScript Date objects.
picker.set('min', new Date(2015,7,14))

// Using formatted strings.
picker.set('max', '20 April, 2016'))

// Using integers as days relative to today.
picker.set('max', 4)

// Using `true` for “today”.
picker.set('max', true)

// Using `false` to remove.
picker.set('max', false)

halfpastfouram avatar Jan 06 '20 13:01 halfpastfouram

You can do it using the following : picker.pickadate("picker").$root.remove()

Hope that will help

MROALI avatar Jan 23 '20 15:01 MROALI