-function setupPoints(numberformat, wrongFormat) {
- decpoint = numberformat.substring((numberformat.substring(1, 2).match(/\.|\,|\'/) ? 5 : 4), (numberformat.substring(1, 2).match(/\.|\,|\'/) ? 6 : 5));
- if (numberformat.substring(1, 2).match(/\.|\,|\'/)) {
- thpoint = numberformat.substring(1, 2);
- }
- else {
- thpoint = null;
- }
- wrongNumberFormat = wrongFormat + " ( " + numberformat + " ) ";
-}
-
-function setupDateFormat(setDateFormat, setWrongDateFormat) {
- dateFormat = setDateFormat;
- wrongDateFormat = setWrongDateFormat + " ( " + setDateFormat + " ) ";
- formatArray = new Array();
- if(dateFormat.match(/^\w\w\W/)) {
- seperator = dateFormat.substring(2,3);
- }
- else {
- seperator = dateFormat.substring(4,5);
- }
-}
-
function centerParms(width,height,extra) {
xPos = (screen.width - width) / 2;
yPos = (screen.height - height) / 2;
}
function check_right_number_format(input_name) {
+ var decpoint = kivi._number_format.decimalSep;
+ var thpoint = kivi._number_format.thousandSep;
+
var test_val = input_name.value;
if(thpoint && thpoint == ','){
test_val = test_val.replace(/,/g, '');
return true;
}
+ var dateFormat = kivi.myconfig.dateformat;
+ var seperator = kivi._date_format.sep;
+
if ( ( input_name.value.match(/^\d+$/ ) ) && !(dateFormat.lastIndexOf("y") == 3) ) {
// date shortcuts for entering date without separator for three date styles, e.g.
// 31122014 -> 12.04.2014
[%- USE JSON %]
kivi.myconfig = [% JSON.json(MYCONFIG) %];
$(function() {
- setupPoints(kivi.myconfig.numberformat, '[% JavaScript.escape(LxERP.t8("wrongformat")) %]');
- setupDateFormat(kivi.myconfig.dateformat, '[% JavaScript.escape(LxERP.t8("Falsches Datumsformat!")) %]');
-
$.datepicker.setDefaults(
$.extend({}, $.datepicker.regional[kivi.myconfig.countrycode], {
dateFormat: kivi.myconfig.dateformat.replace(/d+/gi, 'dd').replace(/m+/gi, 'mm').replace(/y+/gi, 'yy'),