Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
A Client Script used to set a Date/Time field to empty in Tablet Mode may return the unexpected value 1969-12-31 19:00:00 - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • A Client Script used to set a Date/Time field to empty in Tablet Mode may return the unexpected value 1969-12-31 19:00:00
KB0681663

A Client Script used to set a Date/Time field to empty in Tablet Mode may return the unexpected value 1969-12-31 19:00:00


2910 Views Last updated : Oct 16, 2023 public Copy Permalink
KB Summary by Now Assist

Description

When using a Client Script to try to set a Date/Time field to empty in Tablet Mode, the value returned will be 1969-12-31 19:00:00.
When leaving the Date/Time field blank, the system is inputting a negative value to calculate the unexpected date. No error message is thrown.
 

 

 

Steps to Reproduce

Activate 'Tablet Device Support - iPad with iOS 6+' plugin
 
1) Go to System Definition > Tables
2) Search for Incident and open
3) Under Column Tab, click New
4) Set the following:
 
Type: Date/Time
Column label: Tablet Date
Column name u_tablet_date
 
Leave everything else default
5) Save
6) Go to Incident > Create New
7) Right-click header > Configure > Form Layout
8) 'Under Form view and section' > Section, scroll down to New…
9) Section caption: Tablet Test
10) Click 'OK'
11) In the left 'Available' column, find 'Tablet Date' and add to the 'Selected' column
12) Click 'Save'
13) Go to System Definition > Client Scripts
14) Click 'New'
15) Set the following (I have also attached the client script  sys_script_client_71803cb0747022004e829bd26ebc8fba.xml):
 
Name: Tablet test
Table: Incident[incident]
UI Type: Both
Type: onLoad
Active: check
Global: check
Script: 
function onLoad() {
 alert(g_form.getValue('u_tablet_date'));
 g_form.setValue('u_tablet_date','');
 alert(g_form.getValue('u_tablet_date'));
}
 
16) Save
17) Go to Tablet Development > Switch to Tablet Mode
18) Go to Incident > Create New
19) Notice the alert set to 1969-12-31 19:00:00 - Tablet Date will show 12/31/1969 7:00 PM. The Date/Time field should instead be left to empty with no value.
 

Workaround

After carefully considering the severity and frequency of the issue, and the cost and risk of attempting a fix, it has been decided to not address this issue in any current or near future releases. We do not make these decisions lightly, and we apologize for any inconvenience. 

The issue does not occur on mobile app and desktop.

 


Related Problem: PRB698587

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.