-
Notifications
You must be signed in to change notification settings - Fork 51
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
Date Format Question #13
Comments
Hello @oleteacher ! Actually, there is no way to do that directly. You'll have to parse the date given by the Bootstrap Datetimepicker plugin. But it's quite simple, I suppose that the datetimepicker plugin will give you a date object, so you can then get the year, month, day, etc. Otherwise, if you want to contribute, we can easly improve simplyCountdown plugin to allow users to pass datetime object directly in parameters. The only thing we have to watch out is a priority system like :
|
Greets! I had tooled around with the plugin and found no simple way to use with standard date/time pickers. If the opportunity arises in the future, will revisit and try to convert in classroom project:) Thanks! |
Sound great ! Very happy that the plugin can be used in a educational way ! 😄 🎉 |
I just remember that in the demo, I'm using the plugin with Date objects... var d = new Date();
simplyCountdown('.simply-countdown-one', {
year: d.getFullYear(),
month: d.getMonth() + 1, // Because January is 0 and December is 11
day: d.getDate(),
// etc ...
}); So you can get the date object from the plugin and use it like in the example. |
Excellent work, thank you for sharing!
Is there any way to format the date within simplyCountdown so that standard date pickers can be used? Example: I have input form and users pick a date using https://cdnjs.com/libraries/bootstrap-datetimepicker
Since most date / time pickers can use formats like "2018-12-31 23:55:21", is there way to use this format with simplyCountdown?
Thanks!
The text was updated successfully, but these errors were encountered: