mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
Language fix for datetimepicker()
This commit is contained in:
@@ -64,7 +64,13 @@ function loadJSAddons()
|
|||||||
e107::css('core', 'bootstrap-datetimepicker/css/datetimepicker.css', 'jquery');
|
e107::css('core', 'bootstrap-datetimepicker/css/datetimepicker.css', 'jquery');
|
||||||
e107::js('core', 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 2);
|
e107::js('core', 'bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js', 'jquery', 2);
|
||||||
|
|
||||||
|
$bs_date_link = "bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.".e_LAN.".js";
|
||||||
|
|
||||||
|
if(e_LAN != 'en' && file_exists(e_WEB_JS.$bs_date_link)) // load datetime picker language file.
|
||||||
|
{
|
||||||
|
// e107::getMessage()->addDebug("Loading ".$bs_date_link);
|
||||||
|
e107::js('core', $bs_date_link, 'jquery', 2);
|
||||||
|
}
|
||||||
|
|
||||||
e107::js('core', 'jquery.elastic.js', 'jquery', 2);
|
e107::js('core', 'jquery.elastic.js', 'jquery', 2);
|
||||||
e107::js('core', 'jquery.at.caret.min.js', 'jquery', 2);
|
e107::js('core', 'jquery.at.caret.min.js', 'jquery', 2);
|
||||||
|
@@ -662,7 +662,7 @@ class e_form
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$text .= "<input class='{$class} input-xlarge' type='text' size='{$size}' name='{$name}' id='{$id}' value='{$value}' data-date-format='{$dformat}' data-date-ampm='{$ampm}' data-date-firstday='{$firstDay}' {$required} />";
|
$text .= "<input class='{$class} input-xlarge' type='text' size='{$size}' name='{$name}' id='{$id}' value='{$value}' data-date-format='{$dformat}' data-date-ampm='{$ampm}' data-date-language='".e_LAN."' data-date-firstday='{$firstDay}' {$required} />";
|
||||||
}
|
}
|
||||||
|
|
||||||
// $text .= "ValueFormat: ".$dateFormat." Value: ".$value;
|
// $text .= "ValueFormat: ".$dateFormat." Value: ".$value;
|
||||||
|
@@ -156,13 +156,13 @@ $(document).ready(function()
|
|||||||
// https://github.com/smalot/bootstrap-datetimepicker
|
// https://github.com/smalot/bootstrap-datetimepicker
|
||||||
|
|
||||||
$("input.e-date").each(function() {
|
$("input.e-date").each(function() {
|
||||||
|
|
||||||
$(this).datetimepicker({
|
$(this).datetimepicker({
|
||||||
minView: 'month',
|
minView: 'month',
|
||||||
maxView: 'decade',
|
maxView: 'decade',
|
||||||
autoclose: true,
|
autoclose: true,
|
||||||
format: $(this).attr("data-date-format"),
|
format: $(this).attr("data-date-format"),
|
||||||
weekStart: $(this).attr("data-date-firstday")
|
weekStart: $(this).attr("data-date-firstday"),
|
||||||
|
language: $(this).attr("data-date-language")
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -171,7 +171,8 @@ $(document).ready(function()
|
|||||||
autoclose: true,
|
autoclose: true,
|
||||||
format: $(this).attr("data-date-format"),
|
format: $(this).attr("data-date-format"),
|
||||||
weekStart: $(this).attr("data-date-firstday"),
|
weekStart: $(this).attr("data-date-firstday"),
|
||||||
showMeridian: $(this).attr("data-date-ampm")
|
showMeridian: $(this).attr("data-date-ampm"),
|
||||||
|
language: $(this).attr("data-date-language")
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user