PDA

View Full Version : Default Date



SpringBox
2014-04-29, 03:20
Hi Guys

When entering a date in a date field, Lianja pops up a date picker - works great.

If the date field is currently blank - the default is 1752. How do we define a default date?

We have tried putting DATE() in the field default property but that does not seem to work.

Any suggestions?

TIA

SpringBox

barrymavin
2014-04-29, 04:10
Is that in a Form, Grid or Canvas section?

SpringBox
2014-04-29, 04:26
Hi Barry

Sorry - should have been more specific.

It is a table date field in a form section.

Thanks

SpringBox

yvonne.milne
2014-04-29, 08:58
Hi SpringBox,

That's working fine for me, e.g. southwind!orders.orderdate in a Form Section. Setting the Default attribute for the formitem or in the field attributes for the column itself to date(). Are you getting an error reported (Console or App Inspector)?

Regards,

Yvonne

SpringBox
2014-04-29, 12:31
Hi Yvonne

Just to clarify, this is a form section field, not a grid.

Rechecked :

Table field is TYPE Date()
Table field is currently empty - no date stored

Form field Default property is set to Date() [tried date() but makes no difference]

Always get September 1752 as the default month on the date picker in both App Builder and App Center.

What are we missing?

Cheers

SpringBox

yvonne.milne
2014-04-29, 12:44
Is this when you add a new record, or is the blank date in an existing record?

Regards,

Yvonne

SpringBox
2014-04-29, 13:01
Hi Yvonne

This is a blank date in an existing record.

We have never been able to get the date picker to produce anything other September 1752 on a blank record - the only time you need a default.

On a populated field ie one with a valid date in it - works perfectly.

Hope this helps

Cheers

SpringBox

yvonne.milne
2014-04-29, 13:18
Hi SpringBox,

The Default (form attribute or data dictionary field attribute) will operate on a newly added record and that does set the date to today and the date picker to start from today.

For an existing record ... I'll have to have another think.

Regards,

Yvonne