Page 1 of 1

How To Set Initial Date Value?

PostPosted: 06 Jul 2016 23:01
by Aggie85
Howdy All!

I am using a TIWCGJQMMobiScroll2 control and have it set as follows:

Preset : jqmspDate

PresetOptions/DateFormat: mm/dd/yy ddd

PresetOptions/DateOrder : mmD ddy

If I don't initialize the control and select a date, it displays as follows:

07/06/16 Wed

which is what I want.


If I try and set the value directly by

IWCGJQMMobiScroll21->JQMCoreOptions->Value = "07/06/16 Wed";

I get an unhandled exception page with:

Error message: '07/06/16 Wed' is not a valid date.

If I set the date as follows:

IWCGJQMMobiScroll21->JQMCoreOptions->Value = "07/06/16";

The date is set but NOT displayed with the DAY.

How do I set the initial date value and get it to display properly!

Thanks in advance!

Aggie85

Re: How To Set Initial Date Value?

PostPosted: 07 Jul 2016 18:33
by Jorge Sousa
Hello Aggie

You have to use

PresetOptions/DateFormat: ddd mm/dd/yy

instead, since mm/dd/yy ddd is not valid for StrToDate

Re: How To Set Initial Date Value?

PostPosted: 07 Jul 2016 20:04
by Aggie85
Howdy Jorge!

Thanks for your help! I got it working after getting my formatting parameters to match!

All the best!

Shane