Problem/Motivation

I am trying to use the Bootstrap Datepicker with a view that uses the Views Entity Form Field. The other widget options work for picking the date, but not the Bootstrap Datepicker, but just for some dates: notably 1 Jan 2017 and 1 Jan 2016

See the attached screenshot. The field on the left is a date appearing simply as a date field. The field on the right is the same field, rendered as a Form Field so that it can be edited. They all work fine, unless the date is 1 Jan 2017, which renders in the Form Field as 1 Jan 2016. If I use another widget to render the Form Field I do not have this problem. If I select the 1 Jan 2016 date and save the form, it will save with 1 Jan 2016, which will show correctly in the rendered field but will show as 1 Jan 2015 in the Bootstrap Datepicker field. Again, if I select 1 Jan 2016 in the Bootstrap Datepicker, it save as 1 Jan 2015. But then the error stops. Only those two dates see to break.

I have tried this date with other fields and other records and I get the same error. I have tried changing the format of the Bootstrap Datepicker to a different order and I get the same error. There are no error messages showing up on the screen or in the Drupal Log.

I tried using "dd-mm-Y" instead of "dd-mm-yyyy" as the format, and this interprets the date correctly, but it cannot pick a date, inserting a capital Y as the year in the box.

I have also tried it with Bootstrap coming from CDN or Locally, and get the same error, but the error also shows up in the Preview inside of Views, which uses the Seven theme.

CommentFileSizeAuthor
datepicker error.png134.52 KBscottop
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

scottop created an issue. See original summary.

scottop’s picture

Issue summary: View changes

dench0 made their first commit to this issue’s fork.

dench0’s picture

Version: 8.x-1.0-beta3 » 8.x-1.x-dev
Status: Active » Needs review
martijn de wit’s picture

Thank you!

  • Martijn de Wit committed 539becb on 8.x-1.x authored by dench0
    Issue #3190219 by dench0, scottop, Martijn de Wit: Date interpreted...
martijn de wit’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.