1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-17 12:01:05 +02:00

Issue #1157 - Should fix datepicker locale issue.

This commit is contained in:
Cameron
2015-07-26 17:33:15 -07:00
parent df92643280
commit 03fb11dfc0
6 changed files with 94 additions and 442 deletions

View File

@@ -1052,9 +1052,37 @@ class e_form
// $text .= " ({$dformat}) type:".$dateFormat." ".$value;
// Load it in the footer.
e107::css('core', 'bootstrap-datetimepicker/css/datetimepicker.css', 'jquery');
e107::css('core', 'bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css', 'jquery');
e107::js('core', 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 2);
if(e_LANGUAGE !== 'English')
{
e107::js('footer-inline', e107::getDate()->buildDateLocale());
}
e107::js('footer-inline', '
$("input.e-date").each(function() {
$(this).datetimepicker({
minView: "month",
maxView: "decade",
autoclose: true,
format: $(this).attr("data-date-format"),
weekStart: $(this).attr("data-date-firstday"),
language: $(this).attr("data-date-language")
});
});
$("input.e-datetime").each(function() {
$(this).datetimepicker({
autoclose: true,
format: $(this).attr("data-date-format"),
weekStart: $(this).attr("data-date-firstday"),
showMeridian: $(this).attr("data-date-ampm"),
language: $(this).attr("data-date-language")
});
});
');
return $text;