I want to add a filter for a date column with lte, equal or gte options for the date selected in the datepicker.
- The filter is only for the date (not the time) and each cell is formatted "YYYY-MM-DD hh:mm:ss" and is UTC.
- Each cell has a render that converts the UTC to local so it is displayed in the local format and timezone in the cell (data is still UTC)
- The filter is to work only on the date part, being lte, equal OR gte (ignore the time part)
- The date picker is obviously local format and timezone
- I also use moment (see examples below)
Basically I need to have a datepicker in the column filter, limited to a choice of lte, equal or gte and the date chosen in the drop down fileter needs to be converted to UTC before compare to the data (I could even include the time at start and end of the day for the compare so it could be a simple string compare)
I use moment so I can convert a local date to UTC by:as_utc = moment(local_date).utc();
startUtc = moment(local_date).startOf('day').utc().format("YYYY-MM-DD HH:mm:ss");
endUtc = moment(local_date).endOf('day').utc().format("YYYY-MM-DD HH:mm:ss");
etc...