Hi,
Would be nice if for date fields we could set up validation like Date is @Code("Today") instead of a fixed date/time.
Best Regards,
Nuno
Hi,
Would be nice if for date fields we could set up validation like Date is @Code("Today") instead of a fixed date/time.
Best Regards,
Nuno
Hi Morten,
But if you have a datetime field, you will get a datepicker to use.
Will your suggestion work in the datepicker?
It worked for me. Try it out :)
When you click inside the date field a date picker will appear, but you can also enter a value directly in the field. You might need to select a date first and then enter a value afterwards in order to avoid the date picker.
Hmm nice:)
I guess its another thing though with the date and time field?
But I can see it working on the datefield only, as you say.
Hi Morten,
Thanks, then I would like to change my feature request to have this be a little bit more user friendly :p
Best Regards,
Nuno
Is it also possible to set filter up using @Code() or similar, where you can test if either a valid to date is After today, or if the Date field is empy?
Someting like:
DateTo is after @Code.Date.Time.today
or
DateTo.IsNullOrEmpty
Can this be done in some way?
Hi Hans
Not sure Dynamicweb items supports 'nullable' dates. But you simply create two filters - one checking the date and the other checing for the empty string - and combine them using OR under the filtering section.
Ok, thank you Nicolai
Then one of them would be Date is @Code(DateTime.Today)
what would the other look like? Date is ???
thanks for the help
regards Hans
Field | Condition | Value |
Date | Is | @Code(DateTime.Today) |
- See more at: http://developer.dynamicweb.com/forum/feature-requests/feature-requests/item-publisher-date-filters.aspx#sthash.1IhBJqFF.dpuf
Field | Condition | Value |
Date | Is | @Code(DateTime.Today) |
- See more at: http://developer.dynamicweb.com/forum/feature-requests/feature-requests/item-publisher-date-filters.aspx#sthash.1IhBJqFF.dpuf
Depends on what you want to do
But it would be "Date" "is after" "@Code(DateTime.Today)" or "date" "is" ""
Ok
So I´ll just have to leave the field empty
I´ll try that thank you
regards, Hans
Unfortunatly I can not leave the field empty. It automatically fills inn todays date, if i try to save an empty date field http://screencast.com/t/ppFD0ZDcAiB
Then make sure the field has a value on creation so you have something to test against in your filter settings.
BR Nicolai
But that is the point. I want to test if the Datefield is empty/undefined. But that can´t be done it seems. It is on this page that I try to set the filter http://leinkjan15.net.dynamicweb-cms.com/Default.aspx?ID=8971&Purge=True
You can set the default value to a specific date - i.e. 1/1-2015 and you can use that value to test against. The best I can do.
Ok, thank you Nicolai. I will post a feature request for making it possible to test if a datefield is empty/undefined:
Regards, Hans