Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
7 replies
Subscribers
8 subscribers
Views
4612 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
AI and Rules
I have a dateField on a SAIL form. I need to add an validation that the selected
rohitw
Certified Lead Developer
over 9 years ago
I have a dateField on a SAIL form. I need to add an validation that the selected date must not be in the past. I am in MST. I have added like:
load(
local!selectedDate: today(),
a!dateField(
label: "Start Date",
labelPosition: "ABOVE",
value: local!selectedDate,
saveInto: {
local!selectedDate
},
validations: {
if(
local!selectedDate < today(),
"Date must be current or in future",
""
)
}
)
)
The issue I am facing is that the validation works fine till 5 PM MST only. After that it doesn't work. How should this be handled?
OriginalPostID-198781
OriginalPostID-198781
Discussion posts and replies are publicly visible
Parents
0
Jaggu
over 9 years ago
you cannot compare gmt or local of date value to today(), because gmt and local returns date and time so you have to convert again to todate,
So my approach is try todate(local!selectedDate), or todate(local(local!selecteddate))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Reply
0
Jaggu
over 9 years ago
you cannot compare gmt or local of date value to today(), because gmt and local returns date and time so you have to convert again to todate,
So my approach is try todate(local!selectedDate), or todate(local(local!selecteddate))
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
Children
No Data