-
Notifications
You must be signed in to change notification settings - Fork 183
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
Edit dates with a calendar (<input type="date">) #1064
Comments
|
For detecting dates, you can use To support Lines 318 to 322 in 8e98367
Then in JS we use DT/inst/htmlwidgets/datatables.js Lines 831 to 837 in 6073c02
Of course, it will be nice to automatically detect dates and use Currently we know which columns are dates only when column filters are present: Lines 673 to 675 in 8e98367
DT/inst/htmlwidgets/datatables.js Line 82 in 8e98367
|
@yihui
As we said two days ago, it would be nice to be able to edit dates with an
<input type="date">
in a DT table.I could do it but I'm not very familiar with dates in R. I think
is(x, "Date")
is ok to detect a date (this is the way used in lubridate). Once we get a date in this way, it remains to format it asyyyy-mm-dd
in order to pass it to JavaScript. How to do that? I quickly searched on StackOverflow but all the answers I found suggest to use a package such as lubridate or anytime. Are you ok for importing a new package in DT?The text was updated successfully, but these errors were encountered: