Hello,
I just want to set the default date of a date field as today's date, what do I need to enter in the default value field of the object menu?
Thanks!
Dave
If you look in the Custom LIbrary there is a Current Date object. Just dragh that onto your form and it will populate with today's date when you render the form.
Paul
Views
Replies
Total Likes
I don't see what you are talking about. I only have a date/hour field that I can drag to the form, but nothing concerning Current Date?
Also, I would like a field that shows today's date as a default value, but that the user can change if he wants to...
Thanks for your help!
Dave
Views
Replies
Total Likes
I have included a screen shot .....
Paul
Views
Replies
Total Likes
Thanks for the screen shot, I had forgotten about the custom objects!
Is there a way that I can have this default date, but that the user can change it? In the object panel of my date/hour field, there is a place where I can enter a default value. Is there some kind of script I can enter that will make today's date the default value instead of a precise date?
Thanks again!
Views
Replies
Total Likes
Instead I would suggest that you use code on the Doc Ready event to do this:
if
(this.rawValue == null) then
$.rawValue
= num2date(date(), DateFmt(1))
endif
Remember that this is FormCalc code so set the language in the script editor accordingly. The if condition is used so that if you save the form and open it again the values are not over written with the current date.
Hope that helps
Paul
Views
Replies
Total Likes
I just realized that with the ES 2 version of LCD, it's fairly easy to do this with the Action Builder!
Thank you very much for your help!
Views
Replies
Total Likes
Unbelievable - another idiot that doesn't read the question and jumps straight in with the wrong answer. The question is 'set today's date as the DEFAULT date' idiot - not the committed date.