Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
Wilder Galvão
387
Views
9
Comments
Problem with Initial Date in Input_Calendar RichWidget
Question
OutSystems Widgets
Hi,
I'm using the Input_Calendar RichWidget to fill a Date Time type variable in a form. I set the InitialDate property with the function CurrDateTime(), but when I open the Input_Calendar the initial date is '01-01-1900 00:00:00'. This only happens when the variable is null (I use it this way when I'm trying to create a new object), when it's not (when I'm editing an existing object) the variable is correctly filled.
Does anyone knows how can I solve this problem or what is causing it?
Ps.: Did a quick search in OutSystems Forum and found an issue with the Input_Calendar in Windows 8 + Chrome. That's exactly what I'm using, but the problem in that discussion was different.
Link
.
Ps2.: System's date and time are configured correctly in my notebook.
Kilian Hekhuis
MVP
Wilder,
I'm not sure what's causing this, but why aren't you setting the variable that's associated with the form field to the desired value, instead of trying to set the InitialDate?
1 reply
19 Jan 2016
Show thread
Hide thread
Wilder Galvão
Kilian Hekhuis
wrote:
Wilder,
I'm not sure what's causing this, but why aren't you setting the variable that's associated with the form field to the desired value, instead of trying to set the InitialDate?
The variable is set this way. I'm sorry if that wasn't clear. The InitialDate I'm talking about is a property of the Input_Calendar RichWidget. I can't set the variable associated with the form to this property because, when I'm creating a new object, that value is null. Wouldn't that be a problem?
Thank you for the attention.
Kilian Hekhuis
MVP
What do you mean by "creating a new object"?
Wilder Galvão
Create a new entity register with the action CreateOrUpdateEntity.
Kilian Hekhuis
MVP
Yeah, but I assume you are first letting the user fill in all values before doing that. So why don't you set the date to the desired value first?
Wilder Galvão
Let me show you the problem. This is the form we're talking about. Notice that the "default" date of the "Próxima Execução" field is set to "01-01-1900 00:00:00". That's what I'm trying to fix with the InitialDate property of the Input_Calendar RichWidget.
Kilian Hekhuis
MVP
Yes, I understand you are trying to fix that. I'm not sure whether InitialDate is even meant to work like that, but I'm saying that you should set the variable associated that date to the desired value, and not try to rely on the calendar widget.
Wilder Galvão
Ok. I'll do that. Thank you!
john vincent quizon
Hi Wilder,
If you don't want to display the value of date as null in the text box you can always assign a default value for it.
Or
If you want the user to be the one to input the value then check the property of the text box there should be a property for NULL VALUE in there just input the default null value for it not to be displayed in your example the input should be #1900-01-01 00:00:00#
Hope this helps
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...