1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00
This commit is contained in:
Hillel Coren 2016-03-03 22:24:27 +02:00
parent 747f199ce8
commit b719f243c2
2 changed files with 8 additions and 2 deletions

View File

@ -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()
{

View File

@ -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,