Reactive date time field not showing AM PM or 24 hours

Hi!

I have a date time input field in my reactive app.

It's showing the date and the time but the time is in 12 hours instead of 24.

So in this case normally you would need to send the AM or PM.

But that field is not there :|



The reactive date time picker is also a bit strange it returns the selected date time but when storing it in the value in the screen it show's it without.



First I select the value looks like this:


In the DatePickerOnSelect I set the value of the variable DateTime like this:



Then the screen shows:


In this other post I have seen this code that I'm using to hide the default date picker and only use the Outsytems UI date picker:


/* Hides the default calendar */
input::-webkit-calendar-picker-indicator{
    display: none;
}

input[type="date"]::-webkit-input-placeholder{ 
    visibility: hidden !important;
}


https://www.outsystems.com/forums/discussion/56151/outsystems-ui-datepicker-in-react/

Hi,

Did you check the documentation?

Have you tried making a Date Time format?

Day:
- d: day without leading zero;
- dd: day WITH leading zero;
- ddd: abbreviated day name;
- dddd: full day name;
Month:
- M: month without leading zero;
- MM: month WITH leading zero;
- MMM: abbreviated month name;
- MMMM: full month name;
Year:
- y: last one or two digits of the year;
- yy: last two digits of the year;
- yyyy: year;
Hour:
- h: hour from 0 to 12 without leading zero;
- hh: hour from 0 to 12 WITH leading zero;
- H: hour from 0 to 24 without leading zero;
- HH: hour from 0 to 24 WITH leading zero;
Minute:
- m: minutes without leading zero;
- mm: minutes WITH leading zero;
Second:
- s: seconds without leading zero;
- ss: seconds WITH leading zero;
AM Designator:
- t: first letter of AM or PM;
- tt: AM or PM.

If you want to output any of these characters then precede it with '\'.
Changing the environment date format does not change the way the FormatDateTime function formats the dates.


Cheers

Hi Miguel, Maybe I'm a bit of a noob but the problem now is dat it's not showing the input field in 24 hours but in 12 hours:

It's possible you send me a OML of this part of application?

Before all try put this in the prompt: 

"yyyy-MM-dd %H:%M"

Or  use FormatDateTime(DateTime, Text) 

Hi Freek,

Basically datetime Store in DB as 24 hr format after that you can chage format when show.

as in this case you can do take text type variable for this input and input widget bind with datepicker

on datepicker event you can change format of date and assign with input variable.


Regards

Rahul

See attachment

Hi,

please see the OML example.



Cheers

Hi Migul,

But in your example your not using the Outsystems UI datepicker.