Custom date field in line_items impacted by user profile settings num_grp_sep and dec_sep

Hello community,
I created a custom date (datum_c) field in line_items an customized line_items.js .
dev- and target-system are version 7.11.18, Sugar Version 6.5.25 (Build 344) running on Debian 10.
I used the JS Objekt Calendar to pop up the date choice.
First my profile setting where ‘1000s separator’ , (comma) and ‘Decimal Sympol’ . (full-stop) .
It works and showed up correctly in invoices and quotes.
ok
If the users settings are european flavour (comma and full-stop vice versa),
settings
I always see a ‘-NaN,NaN’ in the date field.
nan
There is no further information seen in suitecrm.log (level debug) nor in the javascript console.
In javascript console I logged the content of tableid in insertProductLine() and the custom date (datum_c) is correctly included.

This is my source in line_items.js

  var a0 = x.insertCell(cellix++);
  a0name='product_datum_c[' + prodln + ']';
  a0id='product_datum_c' + prodln ;
  dformat="%m/%d/%Y %H:%M";
  iformat="%d.%m.%Y %H:%M";
  a0.innerHTML  =  `
	<div class="col-xs-12 col-sm-8 edit-view-field " type="date" field="${a0id}">
		<span class="dateTime">
			<input class="date_input" autocomplete="off" type="text" name="${a0name}" id="${a0id}" value="" title=""  tabindex="0" size="11" maxlength="10">
			
			<button type="button" id="${a0id}_trigger" class="btn btn-danger" onclick="return false;">
				<span class="suitepicon suitepicon-module-calendar" alt="Datum eingeben"></span>
			</button>
		</span>
	</div> `
	;
  console.log(a0.innerHTML);

	Calendar.setup ({
		inputField : a0id,
		form : "EditView",
		ifFormat : iformat,
		daFormat : iformat,
		button : a0id+'_trigger',
		singleClick : true,
		dateStr : "05.05.2021",
		startWeekday: 0,
		step : 1,
		weekNumbers:false
	}
	);

Sorry, I had to remove the backticks at ##, because of the editor here… :blush:
And the editor ate my opening div and span too.

(have a look at how I edited your post to see how to insert code with syntax highlighting, and keeping backticks :wink: )