Problem/Motivation

Sunday cannot be selected as a date, even if the form field configuration does not disable any days.

Steps to reproduce

  1. Install the module, configure Tempus Dominus to use CDN
  2. Edit an existing content type's date and time field form display to use Bootstrap DateTime picker
  3. Leave all options to disable days unchecked
  4. Set a date on a node of that content type. Sunday cannot be selected.

Proposed resolution

Add a condition in js/drupal.bootstrap_datetime_picker.js to check if the disable days option has been filled with data other than an array of 0s. This ensures a 'daysOfWeekDisabled' setting will not be added to the UI options if nothing was selected.

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

enertron created an issue. See original summary.

nilesh.addweb’s picture

Status: Active » Needs review
StatusFileSize
new587 bytes

Please review.

prashant.c’s picture

Thanks for raising and submitting the patch.
Could you please raise the MR also?

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

kanchan bhogade’s picture

I've tried to reproduce the issue but am unable to reproduce it.
Please provide the detailed Steps to Reproduce the issue

enertron’s picture

Issue summary: View changes

Added steps to reproduce.

atul_ghate’s picture

I have reproduced this issue using the mentioned steps.

prashant.c’s picture

It would be helpful if someone could post screenshots of the issue before (by reproducing the problem) and after (after applying the changes in the MR).

paraderojether’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new2.38 MB
new3.65 MB

Hi

I reviewed MR!6, applied it against Bootstrap DateTime Picker 4.0.0-beta3, and confirmed I can select Sunday as a date now.

I added a before and after screen recording for reference.
Thank you.

prashant.c’s picture

Version: 4.0.0-beta3 » 4.x-dev
Status: Reviewed & tested by the community » Needs review

@paraderojether

Thanks somehow mov files are not working, not sure it is for me only. Could you please attach some gif or png/jpgs.

prashant.c’s picture

prashant.c changed the visibility of the branch 4.x to hidden.

prashant.c changed the visibility of the branch 3663404-cannot-select-sunday-as-date to hidden.

prashant.c’s picture

Status: Needs review » Fixed

Thanks to all the contributors.

prashant.c’s picture

prashant.c’s picture

Credited all the contributors.
Cheers!

Status: Fixed » Closed (fixed)

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