I can't find a way how to Change the language on a the databox
this are my codesnippets I am loading the language files
<script type="text/javascript" src="../../js/i8n/jquery.mobile.datebox.i18n.en.js"></script>
<script type="text/javascript" src="../../js/i8n/jquery.mobile.datebox.i18n.de.js"></script>
<div data-role="fieldcontain" id="langSelect">
<label for="picklang">
Language</label>
<select name="picklang" id="picklang" data-native-menu="false">
<option value="en">[en] English US</option>
<option value="de" selected="selected">[de] German</option>
</select>
</div>
<div data-role="fieldcontain" id="calendar">
<input name="startDate" type="date" data-role="datebox" id="startDate" data-options='{"mode": "flipbox", "useLang": "de"}' />
</div>
I want to change the localisation of the databox according to the selected values of #picklang and I am using therefore the following script code
<script type="text/javascript">
$(document).delegate('#picklang', 'change', function () {
var val = $("#picklang option:selected").val();
alert(val);
$('#startDate').attr('data-options', '{"mode": "flipbox", "useLang":"' + val + '"}');
});
A this is the problem. The alert shows the selected value but the databox (=flipbox) shows the same values as before (= after loading the page).
Is there anybody, who can give me advice? Michael