The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Getting Error in Date Time Variables - Cannot read properties of undefined (reading 'initial_value')

Bhupendra Rath
Tera Contributor

I am using a simple Date and time type variable to capture the date, there is no default value.

 

It is only for selecting date and time, but when the user selects the field, nothing happens When I checked the console log, I saw the message given below.

 

But when I reload the page, it works as expected. it is not working on the first load of the page.

 

Can anyone please provide the solution for this

 

Thanks in advance 

 

js_includes_sp.jsx?v=08-08-2023_1235&lp=Mon_Jul_31_14_01_16_PDT_2023&c=29_724:39591 Uncaught TypeError: Cannot read properties of undefined (reading 'initial_value')
at HTMLSpanElement.onDpChange (js_includes_sp.jsx?v=08-08-2023_1235&lp=Mon_Jul_31_14_01_16_PDT_2023&c=29_724:39591:32)
at HTMLSpanElement.dispatch (js_includes_sp_libs.jsx?v=08-08-2023_1235&lp=Mon_Jul_31_14_01_16_PDT_2023&c=29_724:19:7496)

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Bhupendra Rath 

Any script written on that?

there should be an option to click OK once user selects date.

Is that user doing that?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur, 

Thanks for responding, When the user clicks on the calendar to select the date, then he selects date after date nothing happens, the selected date does not get set in the field, and when he clicks the 'Ok' button nothing happens

 

I have not written any client script on these fields

 

Thanks in advance