Set date field to today's date by default

JJG
Kilo Guru

Hello,

I have a date field on a form that I would like to be set to today's date by default.

I tried to set the default to: javascript:new GlideDate().getDisplayValue(); It doesn't seem to be working, what am I missing?

 

find_real_file.png

 

32 REPLIES 32

That is what I tried in my initial attempt, check the picture with my question.

Allen Andreas
Administrator
Administrator

Hi,

Please use:

find_real_file.png

javascript:new GlideDate();

Result:

find_real_file.png

Please mark reply as Helpful/Correct. Thanks!

 


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

That's not working. Very confused. Could this be because it is a scoped app?

find_real_file.png

find_real_file.png

find_real_file.png

Working for me

 

Try clearing your instance cache since you've tried like 32 things, haha...

Type: "cache.do" in left-hand navigation and press enter, then check date field.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

I'll just echo this once more about clearing cache because there's really no reason why this basic thing you're trying to do has 23 replies. So I'm going to suspect that there's some system issue that has been introduced or something.


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!