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
+1
person also asked this
people also asked this
Replies
11 replies
Subscribers
8 subscribers
Views
5615 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
User Interface
We have users that want to enter date as mmddyyyy without slashes. They don'
scotte
over 10 years ago
We have users that want to enter date as mmddyyyy without slashes. They don't want to use the DATE type, so this will be a string/text. Also they would like to see this date displayed after they enter is with the slashes, so mm/dd/yyyy. Does anyone has a example, I guess javascript to validate what user entered is a valid date? fyi we noticed the Appian Date type does not validate that the date is valid if you manually enter the date, for example if you enter 13/99/2013 and tab away it does not tell you its invalid, but instead converts to some kind of date. Thanks!...
OriginalPostID-128041
OriginalPostID-128041
Discussion posts and replies are publicly visible
0
Aleksi White
Appian Employee
over 10 years ago
If you run the todate() function on your date, and if it's out of range, you'll get a message such as:
Date out of range (13992013)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
scotte
over 10 years ago
this field is entered on a form. the todate() I can't get to work on a form field. I get a exception thrown. I have it as a Event Rule on 'change'. ?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Aleksi White
Appian Employee
over 10 years ago
What is the exception you are seeing? Could you provide a screenshot, and your application-server.log?
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
scotte
over 10 years ago
Sorry, I can't get to the logs. I've attached some screens. All I did was make a var equal to todate... just a test, but get the exception when tab away from field. Thanks
toDate_exception.docx
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
scotte
over 10 years ago
At this time whether we use the provided DATE picker on form or if we make it a TEXT field we still need to validate the date entered. If you manually enter on using the DATE picker it does not validate...converts to some other date. Is there an example of date validation on a Form field? Thanks!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Aleksi White
Appian Employee
over 10 years ago
forum.appian.com/.../e-121276
Also take a look at this recipe:
forum.appian.com/.../SAIL_Recipes.html
You can modify it to accept a range of dates
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
scotte
over 10 years ago
Forgot to mention we are on version 7.2... not using SAIL.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
scotte
over 10 years ago
Does anyone know why we can't use functions on a form? For example just as a test on a Text field I added a "Event Rule" on "Change". The script is "var testDate = todate(11122014)". So when Im on this field on the form an tab away after entering something I get an exception thrown saying the rule is invalid. Does anyone know what is wrong with the script? Thanks!
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
scotte
over 10 years ago
Thanks, I was able to resolve issue. FYI... Appian API functions such as todate() do not work in forms designer. You must use non appian javascript functions.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
leslies331
over 10 years ago
The todate doesn't seem to work as expected, for example, an invalid date such as: 2/32/2015 returns the value 6/18/8392 however an invalid date such as 2/29/2015 returns 2/28/2015
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
>