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

set_date using optional new Date() instance #122

Closed
AKikhaev opened this issue Jul 18, 2018 · 1 comment
Closed

set_date using optional new Date() instance #122

AKikhaev opened this issue Jul 18, 2018 · 1 comment

Comments

@AKikhaev
Copy link

for example, tomorrow date:

var d = new Date(); d.setDate(d.getDate() + 1);
$('#dt_from').data('Zebra_DatePicker').set_date( d );

to get it now I need convert it to specified format, but this function already has inside the library. so

To support this future need one line inside
plugin.set_date = function(date):

var dateObj;
if (typeof(date)==='object') date = format(date);
....

this future is very helpful after any js date change, especially when new dynamic forms are creating

@stefangabos
Copy link
Owner

Done. Thank you!

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

2 participants