mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for #751
This commit is contained in:
parent
747f199ce8
commit
b719f243c2
@ -127,6 +127,13 @@ class Utils
|
|||||||
{
|
{
|
||||||
return App::getLocale() == 'en';
|
return App::getLocale() == 'en';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getLocaleRegion()
|
||||||
|
{
|
||||||
|
$parts = explode('_', App::getLocale());
|
||||||
|
|
||||||
|
return count($parts) ? $parts[0] : 'en';
|
||||||
|
}
|
||||||
|
|
||||||
public static function getUserType()
|
public static function getUserType()
|
||||||
{
|
{
|
||||||
|
@ -156,13 +156,12 @@
|
|||||||
return moment(this).format(format);
|
return moment(this).format(format);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
ko.bindingHandlers.dateTimePicker = {
|
ko.bindingHandlers.dateTimePicker = {
|
||||||
init: function (element, valueAccessor, allBindingsAccessor) {
|
init: function (element, valueAccessor, allBindingsAccessor) {
|
||||||
var value = ko.utils.unwrapObservable(valueAccessor());
|
var value = ko.utils.unwrapObservable(valueAccessor());
|
||||||
// http://xdsoft.net/jqplugins/datetimepicker/
|
// http://xdsoft.net/jqplugins/datetimepicker/
|
||||||
$(element).datetimepicker({
|
$(element).datetimepicker({
|
||||||
lang: '{{ App::getLocale() }}',
|
lang: '{{ Utils::getLocaleRegion() }}',
|
||||||
lazyInit: true,
|
lazyInit: true,
|
||||||
validateOnBlur: false,
|
validateOnBlur: false,
|
||||||
step: 30,
|
step: 30,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user