1 of 1 people found this helpful
If I understand you correctly.
Datetime fields always default to today's date when you open a new window; that's a feature of the control and I've questioned why it needs to do that too, but hey that's what it does!. What you can do it change the property on thw window design so that this attribute has the checkbox property set to true. If you do this when the window is opened the date is still showing today but greyed out and it's only when the checkbox is checked that the field becomes active.
It is possible to add a datetime field to a window and not populate it with data by doing the following:
1. Start the Window Manager component, and open the required window.
2. Expand the Attributes tree, then add the attribute to the window.
3. Expand the Properties grid for the attribute.
In addition to the standard properties for the control, there are specific Date/Time properties:
Date Time Range Operator – Specifies the type of check that is made when the timespan validation is carried out. The default is After.
Date CheckBox – Specifies if the DateTime control is to display the check box (allowing a blank time to be set). If you set this to True, then another property appears:
Date Checkbox Checked – Specifies whether the check box is checked by default.
4. Set the 'Date Checkbox' property to True, the 'Date Checkbox Checked' property will now be visible
5. Set the 'Date Checkbox Checked' preoperty to False as you do not want the date field active by default.
6. Save the window
When you open the window you will notice that the checkbox next to the date field is not checked and the date field is greyed out but displays todays date (the displayed date is not actually stored in the datbase).
If you want to set a date in the field you would first need to check the checkbox next to the field to activate it and then select a date.
Thank you Martyn, you have solved my problem but I have one thing I noted, if you tick the date field and enter a date, save the record and redisplay the record later it has your saved date with the checkbox still ticked but if someone unticks the checkbox it then appears to blank the date if the person saves the record and displays it again later effectively loosing the original date, so telling people to tick any dates they need to update could result in them unticking ones they want to retain thus deleting it!