Bootstrap datepicker should support more formats

Bug #1833339 reported by Ghada El-Zoghbi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Confirmed
Wishlist
Unassigned

Bug Description

Mahara: 19.04.0
OS: Linux 16.04
DB: Postgres
Browser: FF and Chrome (and others)

The bootstrap date picker supports the following formats:

* https://bootstrap-datepicker.readthedocs.io/en/latest/options.html#format

The date format, combination of d, dd, D, DD, m, mm, M, MM, yy, yyyy.

d, dd: Numeric date, no leading zero and leading zero, respectively. Eg, 5, 05.
D, DD: Abbreviated and full weekday names, respectively. Eg, Mon, Monday.
m, mm: Numeric month, no leading zero and leading zero, respectively. Eg, 7, 07.
M, MM: Abbreviated and full month names, respectively. Eg, Jan, January
yy, yyyy: 2- and 4-digit years, respectively. Eg, 12, 2012.

The Mahara lib/pieforms/pieform/elements/calendar.php file is not supporting all these formats and is still supporting the jQuery UI calendar.

The functions:

* pieform_element_calendar_convert_dateformat() and
* pieform_element_calendar_convert_timeformat()

Need to be updated to support the new date picker.

For example, this date format should be valid:

$string['pieform_calendar_dateformat'] = '%%d/%%mm/%%Y';

Instead, when updating the view access date/times, we get the error:

* Use the format DD/MMm/YYYY

Please note... this is not the only format to test for. Please test for other valid formats.

Tags: snack-sized
description: updated
summary: - Bootstap datepicker supported formats
+ Bootstrap datepicker should support more formats
Changed in mahara:
importance: Undecided → Wishlist
status: New → Confirmed
tags: added: snack-sized
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.