date/time field calendar appears at the top of the form instead of underneath the field

YenGar
Mega Sage

Hello everyone,

In the service catalog, when clicking in the date/time field, the calendar picker appears at the top of the page instead of underneath the field as it should. (screen shot attached). Users have to scroll up to the top of the page when trying to set a date on a catalog item and the field is at the bottom. This doesn't happen in the forms in the back end (ex: incident, change requests. Has anyone encountered this before? If so, what can I do to fix this issue?

date-time.PNG

Any help is appreciated!

Thank you,

Yeny

22 REPLIES 22

Chuck Tomasi
Tera Patron

Hi Yeny,



That's very interesting. I haven't see that before. Can you please provide the release of ServiceNow you are using, the platform (e.g. Windows 10), the browser and version? Have you recently upgraded anything (ServiceNow, OS, etc.) Does it happen to every user or specific users?



Perhaps someone can reproduce it.



Another place to check is if you have client scripts doing any DOM manipulation.



Client Script Best Practices - ServiceNow Wiki


Hi Chuck,



We are in Geneva Patch 7. It's been happening for a few days now. It happens on every browser that we've tried (IE 10, Firefox, Chrome) for all users. There are two client scripts that are running on the service catalog item (script below). I have deactivated the scripts thinking that it was due to the way it was written but the calendar still showed up at the top.



Script:


function onLoad() {


    try{


    var starttime = g_form.getControl('start_time');


  starttime.readOnly = true;


  starttime.style.backgroundColor='#F0F0F0';


  } catch(e) {


    alert(e);


    }


    }


Script:


function onLoad() {


    try{


    var starttime = g_form.getControl('estimated_end_time');


  starttime.readOnly = true;


  starttime.style.backgroundColor='#F0F0F0';


  } catch(e) {


    //alert(e);


    }


    }



Yeny


Yeny,


 


    Open the developer tools of your browser and see if you can find any errors in the console.




Thanks,


Abhinay




Please mark Helpful, Like, or Correct depending on the impact of the response


I did that a few minutes ago and didn't find any immediate errors that popped out at me. I'm still investigating though.



Thank you,




Yeny