Added a patch that makes the module compatible with (the current) V4 Version of Bootstrap datetime picker (V3 has been marked deprecated).

Comments

Denis Danielyan’s picture

StatusFileSize
new953 bytes
sweetchuck’s picture

Thank you. I will check your patch and the JS library to see what happened in the 4.x branch at weekend.
And I think I will start a new branch named "7.x-4.x"

sweetchuck’s picture

StatusFileSize
new6.73 KB
sweetchuck’s picture

StatusFileSize
new7.34 KB
sweetchuck’s picture

Status: Needs review » Needs work

This patch still does not work together with the "All Day" module.

milos.kroulik’s picture

The patch also doesn't work when there isn't any time picker present (date field collection only years, months and days). Also, the date picker was displayed far to the top of the date field. I wasn't able to capture it - date picker hides itself on any keypress.

madt’s picture

Status: Needs work » Needs review
StatusFileSize
new27.98 KB
new23.87 KB

Implemented features so far:

  • sideBySide
  • showTodayButton
  • showClear
  • showClose
  • inline
  • keepOpen (visible if inline is TRUE, and input field can be hidden)
  • calendarWeeks
  • viewMode
  • daysOfWeekDisabled //Requires date_restrictions and weekdays modules
  • minDate, maxDate //Requires date_restrictions module
    • Fixed date, e.g. 18-02-2017
    • Relative date, e.g. '-10 days', '+10 day' //requires interval module
    • Fixed date from a field in the host entity
    • Relative date from a field in the host entity, e.g. interval field set to '+10 day' //requires interval module

If host field is multivalued:

  • value from [0] element will be taken for minDate (if restriction is configured)
  • value from [last] element will be taken for maxDate (if restriction is configured)

This patch also fix "All Day" problem.

gisle’s picture

Status: Needs review » Reviewed & tested by the community

Patch in #7 works fine for me.

lazzyvn’s picture

StatusFileSize
new1.53 KB

I add support module work_calendar

sweetchuck’s picture

Status: Reviewed & tested by the community » Needs work

@madt: What does this line do?

$max_date = date_select_input_date($element['value'], array_merge($element['#restrictions']['max']['date'], array('hour' => 23, 'minute' => 59, 'second' => 59)));
gisle’s picture

@lazzyvn,
please open up a separate issue to add support for Work Calendar.