Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
Date Field error when Resetting a form
Nethaji_Narasimalu
If you try to reset a form with a pre-populate date (e.g. 31-Jan-2003) after you have changed the date to a month that does not contain 31 days (e.g. 28-Feb-2003), the day drop down will be left blank.I've created a simple form workflow with 2 steps:In the first step, set the date to 31st of Jan/Mar/May/Jul/Aug/Oct/Dec & click Apply.In the second step, the date set in the first step should be displayed.Set the month to Feb/Apr/Jun/Sep/Nov (day should change to the last available of the month - 28, 29 or 30) & click Reset.The day will be blank, as 31 does not exist in the day drop down list.My resolution was to create a Reset function: function doReset() { document.myForm.reset(); if ("[LL_FormTag_1_1_2_1 /]"!="") { myForm._1_1_2_1_month.onchange(); myForm._1_1_2_1_day.value="[LL_FormTag_1_1_2_1 /]".split(":")[0].split("/")[3]; myForm._1_1_2_1_day.onchange(); } }This will reset the form, then if the date has been previously set, run the month update function (to reset the day drop down to include all the possible days for that month), set the day to the original day, & rerun the day update function.Is there any other/better way round this?Is there any plans to change the LiveLink Date Field generated code?
Find more posts tagged with
Comments
x-unileveruser11_-_(deleted)
The best way that I have found to deal with the differing date formats is to make the field a text field and then have it populated from a popup which can be configured to handle as many date formats as you need.