Richwidgets Input_Calendar date format issue

Richwidgets Input_Calendar date format issue

  

Hi everyone,

So I'm using the Input_Calendar widget and when changing the date format I noticed that the widget doesn't load the dates.

I already found a workaround by:

1 - Appending text variables to the input fields instead of Dates;

2 - When loading the dates I need to convert them to text in the correct format;

3 - When saving, I need to convert them back to the DateTime format in order for them to be stored as dates in the database.


My question is: Am I doing something wrong or is this how I should be doing it? Quite honestly it can get quite frustrating to do this in all screens that need a date format different to the default one.


Thanks in advance.


Regards,

Ricardo


Hi Ricardo,


Use date format like this. It works for me. Also you can try this "%m-%y-%d", "%d-%m-%y", "%y-%d-%m". 



-Hitesh-

Hey Hitesh, thanks for the reply. The format I am using is: "%d-%m-%Y". You think this specific combination doesn't work?


Hi Ricardo, 

No, All the combination whatever i mention it works. I just want to understand that how you are changing the date format. 

-Hitesh-

Not much different to yours:

For now I'll stick to my workaround or try to use silk's calendar widget to figure out if it has the same issue.

Hello Ricardo,

I don't know if this applies to the Input Calendar, but usually, when we are talking about Date/Time formats, the formats are case sensitive.

Have you tried "%d-%M-%Y"? 

In most formats, M (upper case) is for month, m (lower case) is for minutes.

Cheers,
Eduardo Jauch

EDIT.Sorry, m is for Month. :)

Hi Ricardo,

From my experience with the calendar, the way to go is what you are doing.

To make it work with a different format you have to change the date format in Service Center (to match yours). Otherwise, your app does not know how to convert the text to date. But then, this change in SC, it applies to all your apps and I'm not sure your format is an option there...

But since Hitesh has managed to make it work, maybe I'm wrong. 

Hitesh, could you please share a simple oml where, as an example, the format %m-%y-%d" works.

Thanks.

Cheers,

José

@Eduardo, thanks for the suggestion, however the formats I am using are those provided by the RIchwidgets documentation: 

Jose, great tip! Didn't know that the service center date configuration had to match the format that we are trying to use in order for Richwidgets to recognize it. 

Hitesh, if you can't send us an .oml can you at least provide us with a printscreen of your date settings in service center please?

Hi Ricardo,

Sure, I will provide you the service center date format. We do have 6 date format available in service center. 


-Hitesh-

Ricardo Freitas wrote:

Jose, great tip! Didn't know that the service center date configuration had to match the format that we are trying to use in order for Richwidgets to recognize it. 

Hitesh, if you can't send us an .oml can you at least provide us with a printscreen of your date settings in service center please?

Hi Ricardo,

Just a heads up, keep in mind what José said, and the little extra I add next:

  • All your applications will be affected by the Date format you specify in Service Center, not just the one you're currently developing.
  • You need to republish all modules in the environment (including all of the Systems Components) for the change to work properly.

Thank you all for your help. I will try changing the date format in service center the next time I need to work on dates on my app and if I run into issues I'll be sure to share them here....

Ricardo Freitas wrote:

@Eduardo, thanks for the suggestion, however the formats I am using are those provided by the RIchwidgets documentation: 

Yeah, I notice it AFTER the answer. lol
Sorry :)