mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 01:46:45 +02:00
MDL-35171 formslib Updating date config array to fix problems with month jumping.
Based on https://bugs.php.net/bug.php?id=49115, if you request a month, but do not specify a date, it will use your current date, which may be beyon a date in the month requested, causing the return of the next month. This patch specifies the date (1st).
This commit is contained in:
parent
98157832bf
commit
e0b818cde0
1 changed files with 14 additions and 14 deletions
|
@ -80,26 +80,26 @@ function form_init_date_js() {
|
||||||
$module = 'moodle-form-dateselector';
|
$module = 'moodle-form-dateselector';
|
||||||
$function = 'M.form.dateselector.init_date_selectors';
|
$function = 'M.form.dateselector.init_date_selectors';
|
||||||
$config = array(array(
|
$config = array(array(
|
||||||
'firstdayofweek' => get_string('firstdayofweek', 'langconfig'),
|
'firstdayofweek' => get_string('firstdayofweek', 'langconfig'),
|
||||||
'mon' => strftime('%a', strtotime("Monday")), // 5th Jan 1970 at 12pm
|
'mon' => strftime('%a', strtotime("Monday")),
|
||||||
'tue' => strftime('%a', strtotime("Tuesday")),
|
'tue' => strftime('%a', strtotime("Tuesday")),
|
||||||
'wed' => strftime('%a', strtotime("Wednesday")),
|
'wed' => strftime('%a', strtotime("Wednesday")),
|
||||||
'thu' => strftime('%a', strtotime("Thursday")),
|
'thu' => strftime('%a', strtotime("Thursday")),
|
||||||
'fri' => strftime('%a', strtotime("Friday")),
|
'fri' => strftime('%a', strtotime("Friday")),
|
||||||
'sat' => strftime('%a', strtotime("Saturday")),
|
'sat' => strftime('%a', strtotime("Saturday")),
|
||||||
'sun' => strftime('%a', strtotime("Sunday")),
|
'sun' => strftime('%a', strtotime("Sunday")),
|
||||||
'january' => strftime('%B', strtotime("January")), // 1st Jan 1970 at 12pm
|
'january' => strftime('%B', strtotime("January 1")),
|
||||||
'february' => strftime('%B', strtotime("February")),
|
'february' => strftime('%B', strtotime("February 1")),
|
||||||
'march' => strftime('%B', strtotime("March")),
|
'march' => strftime('%B', strtotime("March 1")),
|
||||||
'april' => strftime('%B', strtotime("April")),
|
'april' => strftime('%B', strtotime("April 1")),
|
||||||
'may' => strftime('%B', strtotime("May")),
|
'may' => strftime('%B', strtotime("May 1")),
|
||||||
'june' => strftime('%B', strtotime("June")),
|
'june' => strftime('%B', strtotime("June 1")),
|
||||||
'july' => strftime('%B', strtotime("July")),
|
'july' => strftime('%B', strtotime("July 1")),
|
||||||
'august' => strftime('%B', strtotime("August")),
|
'august' => strftime('%B', strtotime("August 1")),
|
||||||
'september' => strftime('%B', strtotime("September")),
|
'september' => strftime('%B', strtotime("September 1")),
|
||||||
'october' => strftime('%B', strtotime("October")),
|
'october' => strftime('%B', strtotime("October 1")),
|
||||||
'november' => strftime('%B', strtotime("November")),
|
'november' => strftime('%B', strtotime("November 1")),
|
||||||
'december' => strftime('%B', strtotime("December"))
|
'december' => strftime('%B', strtotime("December 1"))
|
||||||
));
|
));
|
||||||
$PAGE->requires->yui_module($module, $function, $config);
|
$PAGE->requires->yui_module($module, $function, $config);
|
||||||
$done = true;
|
$done = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue