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

Complete date reset #171

Closed
foodgy opened this issue Jul 9, 2013 · 5 comments
Closed

Complete date reset #171

foodgy opened this issue Jul 9, 2013 · 5 comments

Comments

@foodgy
Copy link

foodgy commented Jul 9, 2013

Is it possible to reset calendar date completely?

I mean remove input value and reset year, month, day to current date.
Reset calendar to its initial state.

@amsul
Copy link
Owner

amsul commented Jul 13, 2013

Yup.. You can do that by doing something like this:

picker.$node.val('') // clear the input value
picker.stop().start() // restart the picker

👍

@amsul amsul closed this as completed Jul 13, 2013
@Vishwaas
Copy link

Vishwaas commented May 17, 2016

@amsul doing picker.stop().start() does not start the picker it only stops it

@nxtpl
Copy link

nxtpl commented Jul 9, 2018

Found a way to "reset" the calendar date to the current day:
$(".picker__input").pickadate().pickadate("picker").set("view", new Date());

Someone could add a .reset() method to this library ;)

@DanielRuf
Copy link
Collaborator

Someone could add a .reset() method to this library ;)

If it is not yet implemented, PRs are very welcome =)

@nxtpl
Copy link

nxtpl commented Jul 9, 2018

Called it .today() and submitted the PR :)
#1090

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

No branches or pull requests

5 participants