We are trying to do something very simple using the 'color' options in the views. Basically we have a date field, and we want to make the records with a date less than today red, and the records with a date equal to today green, for example.
When you select a date field (as shown below), there is no option 'equals'. I tried to combine 'less or equal' and 'greater or equal' to get to the equal case but it looks like it is applying only the first color.
Also tried 'less' and 'less or equal', but the 'equal' records don't come up with any color.
Can you simply provide us with the equal option ? Or is there any trick to get to that case?
This is nice and solves the problem of extracting the Todays records.
Which version are you working on, this is working in the 4.0.4 version. The screenshot is as given below.
I am also attaching the xml. It is not working when we use the keyword 'TODAY'. I shall investigate on that further and get back to you.
I don't see any screen shot. We are on 4.0.2 but we ll upgrade to 4.0.4 soon.
Is the keyword 'TODAY' not working in 4.0.4 ?
You are right. It is a date/time field. Sorry I didn't explicitly mention it but you got it :)
Yes it would nice to have this supported for date/time fields as we still want to differentiate the 'todays' records from others, no matter the time.
Also, When I do 'less than' or 'greater than' TODAY, with a date/time field it is working fine, as I am also highliting the 'overdue' records..
Can you please come back to me with a date/release to fix that ? if not, maybe a quick work around? I would prefer to avoid writing code for this ..
Also, there are two more behaviors I would like to report :
1- When the field date/time is 16/12/2015 00:00, it is considered less than TODAY. When it is 16/12/2015 00:01 or any time greater than 00:00, then it is considered greater than TODAY.
So obviously if the date/time is 16/12/2015 00:00, we still want it to be seen as today and not a past date.
2- Now let's say this same date/time field is in an Edit or QC page. Let's say the current value is : 16/12/2015 11:18, if I change the date by clicking on any other day in the calendar, the time will not change, which is good.
But if I click on the footer of the date picker (today s date), as shown in the screen shot below, the time will be updated to 00:00, which is not ideal.
Is that a known behavior ? Or is there a way we could keep the time unchanged when clicking on that footer?
Adding EQUAL to a date/time field won't help much as it would compare down to the seconds.
Maybe you can use an expression field to convert the date/time to a date and then assess if date is TODAY.
I haven't had time to try this, though, so I'm not sure it would work as this is a bit advanced and not sure it was intended to be used that way.
Let us know.
Ok for the equal operator makes sense actually. I will use another date field it is fine.
But can you have a look at my last post where I am describing two other issues?
for 1. above, I entered TP29803 to track this. The doc at documentation.progress.com/.../ states: "The value of the TODAY token is 12PM+1ms of the current day in the time zone of the current user for date/time fields; for date fields, its value is either the beginning (for the greater than operation) or the end (for the less than operation) of the current day." So, we will have to be careful and take some time to evaluate if we can change this behavior.
For 2. above, yes this how the Kendo Date time picker works.
Try it out here: demos.telerik.com/.../index
and you will see that as soon as you click on today's date at bottom it resets the time to 12:00AM but not when you select a date in the calendar itself.
What's the issue with this behavior?
Glad to hear that.