Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update or destroy instance of date picker #242

Open
halfpastfouram opened this issue Jan 6, 2020 · 1 comment
Open

Update or destroy instance of date picker #242

halfpastfouram opened this issue Jan 6, 2020 · 1 comment

Comments

@halfpastfouram
Copy link

halfpastfouram commented Jan 6, 2020

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)
@MROALI
Copy link

MROALI commented Jan 23, 2020

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

Hope that will help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants