Skip to content

Conversation

@renkun-ken
Copy link
Member

@renkun-ken renkun-ken commented Jul 28, 2021

What problem did you solve?

Closes #714

This PR defines a customized comparator that handles the yyyy-MM-dd format from R's Date format string and use this filter params for date columns on DOM loaded.

(If you do not have screenshot) How can I check this pull request?

Run the following R code

View(data.frame(date = seq(as.Date("2021-07-01"), as.Date("2021-07-31"), "day")))

Specify a date and condition in the filter window and it should work correctly now.

@renkun-ken renkun-ken requested a review from ElianHugh July 30, 2021 00:33
@ElianHugh
Copy link
Collaborator

Filtering dates works nicely now, thanks!

POSIX dates don't seem to be caught in vsc.r however (they don't inherit the Date class for some reason), so can't be filtered in the dataview.

@renkun-ken
Copy link
Member Author

POSIX dates will be coerced to strings, so they will be treated as text.

@renkun-ken renkun-ken merged commit aff4515 into REditorSupport:master Jul 30, 2021
ElianHugh pushed a commit to ElianHugh/vscode-R that referenced this pull request May 12, 2022
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

Successfully merging this pull request may close these issues.

Filtering Date column not working in the new data viewer

2 participants