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