84
Views
10
Comments
Solved
How to change date input format, different of class and style in attributes.
Application Type
Reactive

Good day,


I'm finding the solution to change the format of date input from "mm dd yyyy" to "dd mm yyyy". 

When I dealing with this, I saw that there are attribute wit 2 options: class and style.


I would like to ask what is this use for, the difference between class and style in this, and can this help me to change the format of the date input?


Thanks in advance.


Regards,

Joe.

2024-05-08 06-29-37
Prince Aadil Khan Panwar
Solution


as i searched a lot. and got to know, read alot of articles and gone through videos. in normal input type date we can't format it. but yet after selecting and while saving the data we can change it. i suggest you to use date picker instead of the normal date type.

Thanks 

Prince

2024-05-08 06-29-37
Prince Aadil Khan Panwar

hi Joe ng

please put the format of date as you want there are examples you can set as you want to 


thanks 

Prince

UserImage.jpg
Joe Ng

Hi Prince,


I'm not going to use date picker, so your solution may not suitable for my case.

Thanks for your response.


Regards,

Joe.

2024-05-08 06-29-37
Prince Aadil Khan Panwar
UserImage.jpg
Joe Ng
2024-05-08 06-29-37
Prince Aadil Khan Panwar
Solution


as i searched a lot. and got to know, read alot of articles and gone through videos. in normal input type date we can't format it. but yet after selecting and while saving the data we can change it. i suggest you to use date picker instead of the normal date type.

Thanks 

Prince

UserImage.jpg
Joe Ng

Noted, I will try with date picker, thanks for your suggestion.


Regards,

Joe.

UserImage.jpg
Federer Lambert

Unfortunately, this forge can only be used in traditional web

UserImage.jpg
Joe Ng

Noted, thanks for your remind.


Regards,

Joe.

2023-04-17 05-19-55
Vaishali Shrivastava

Hi @Joe Ng 


You can use the FormatDateTime function, available in built-in functions.

Please check this for references.

https://success.outsystems.com/documentation/11/reference/outsystems_language/logic/built_in_functions/format/#FormatDateTime


and write your logic in the on-change of your widget. 


Coming to your second question, using style properties in attributes, you can apply inline CSS. 

and with the class property, you can apply a specific class. Also, here you can apply different classes depending on the condition (if condition(If required). 

But this is used only to apply CSS. It cannot help you change your date format. 


Hope this will help you.

UserImage.jpg
Joe Ng

Hi Vaishali Shrivastava,


Thank you for your response, I tried with the FormatDateTime function before, but I'm not sure where should I place it.


And for the second question thanks for your sharing, good day ahead.


Regards,

Joe Ng.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.