on 2022 Jul 27 3:53 PM
Hello,
I have a problem concerning the format of a date, when I am logged on the launchpad in French, I have the months and days reversed so when I put a date such as December 23, 2022 (23/12/2022), I am told that the format is not correct. ( in English it works I dont have a conversion error )

My XML View
<DatePicker id="_IDDatePicker5"
change="additionalInfoValidation1"
placeholder="{i18n>PBirthDate}"
class="sapUiSmallMarginBottom"/>
My Contoller
var BirthName = this.byId("_IDInput3-2").getValue();
var TrueBirthDate = new Date(BirthDate);
TrueBirthDate.setUTCHours(24);
var oPayLoad = { "BirthDate" : TrueBirthDate, };
this.getOwnerComponent().getModel().create("/Licence", oPayLoad, {success: function (odata, Response) {if (odata !== "" || odata !== undefined ) { MessageBox.success("Created successfully."); that.startWorkflowInstance(oPayLoad); } else { MessageBox.error("New entry not created."); } }, error: function (xhr, ajaxOptions, thrownError) { alert(xhr.status); alert(thrownError); alert(xhr.responseText); } }); }; );
I use a BTP Trial account
Has anyone had the same problem?
If you have more information don't hesitate to mention it in comment
Request clarification before answering.
using getDateValue() from the control, no need new Date(***)
it should go through, though you may have date shifted one day issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Don't forget to accept the question.
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 7 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.