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

Chavan AP
Tera Guru

Right click the field - Configure dictionary- select advanced view and check the 'use dynamic default' check box and select the now(Date and time) function as shown below

 

date.PNG

Chavan AP
[ Architect | Certified Professional]

Was this response helpful? If so, please mark it as Helpful and Accept as Solution to help others find answers.

that's not working:

find_real_file.png

Utpal Dutta1
Mega Guru

Hey JJG,

 

Try this in Default vaue: javascript:new GlideDate().getDisplayValue();

 

If it works mark my answer Correct and Helpful.

 

Thanks and Regards:

Utpal Dutta

Try above