Datepicker forces page jump

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
Kti
Posts: 1
Joined: Thu Feb 05, 2015

05 Feb 2015

Hi

Then a user click on a datepicker field the calender is displayed and the browser jumps to the top of page. If have tried to remove the href attribute from the anchor tag, add return false, prevent default, all without luck.

Is there anyway I can resolve this, because it's very frustrating for the users.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

06 Feb 2015

Hi,

Unfortunately, I cannot reproduce the issue, the calendar appears without page jumps. Is it the out-of-the-box date picker or you use a custom one? Have you tried to reproduce the issue on another form? Please, open the browser console and make sure that no errors appear when you open the calendar.

User avatar
chris.cook
Posts: 20
Joined: Wed May 31, 2017

15 Jun 2017

Hello Dmitry.

I've also come across this issue.
I've got experience in this, it only occurs in some browsers, and is due to the 'a' tag with an href property of #. Some browsers interpret this as an anchor to the top of the page, while others ignore it.

It is not a good way to implement this feature due to this browser inconsistency.
Safari on iPad and Chrome on android and windows 10 are examples of browsers which treat <a href="#"></a> as an anchor to the top of the page.

Since the functionality is bound to the element using the onclick property, simply changing from an a tag to a div or span and removing the href would solve the issue and retain all current functionality.

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

15 Jun 2017

Hi Chris,
Please, try our replacement of default date and time pickers that should be much more user-friendly especially on mobile devices:
https://spform.com/custom-fields/proper ... kers-dates

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests