AdvSmoothDatePicker date format

When I set the date format for the AdvSmoothDatePicker to long date format I get an error "EVariantTypeCastError with message "could not convert variant of type (Unicode String) into type (Date)".

AdvSmoothDatePicker1.Format := 'dddd, dd MMMM, yyyy' does not work.  It does work for AdvDateTimePicker.
AdvSmoothDatePicker1.Format := 'dd MMMM, yyyy' does work.

Delphi XE; Windows 7; TMS 5.9

Any advice?  Thanks.

I am still seeing this error 11 years later.

I can't use any format that contains month or day names, only numbers.

For example -

AdvSmoothDatePicker.Format ="dd/mm/yy" is ok
"dd/mmmm/yy" is not ok.

I get the error as mentioned previously if using the long date format (dddddd).

For any other format that includes day or month names I get an exception "....is not a valid date" when clicking on the drop down arrow. Although if I then select a date in the calendar, that date then appears in the combobox correctly formatted.

VCL UI Pack, 10.5.9
Rad 10.4.2.

@Freeman_Robyn did you ever find a fix or work around for this? Thanks.

I tested this and this actually works.

There is indeed an exception but it is gracefully handled.
If you run the app from inside the IDE, the IDE will always show the exception but if you run this outside the IDE, it should work without any exception showing.

I'm also having a problem with the format property of TAdvSmoothDatePicker:

I have set the format to 'ddd dd.MM.yyyy'. If i change the date value and exit the DatePicker, the value is set back to the value before the change. In debugger mode the above described exception ("could not convert ...") is thrown.

RAD 13.1

VCL UI Pack 13.6.7.0

We used the Delphi RTL function VarToDateTime() that has a shortcoming that it cannot deal with a date format where the day name is used.
We wrote our own function now with broader support and the next update of TMS VCL UI Pack will include this, so this format will also be supported.

Delphi 13

TAdvSmoothDatePicker version 2.6.3.0

With empty property "Format", when clicking to change the date, an exception happens and the following is shown:

εικόνα

We've seen this issue and fixed it now.
As a workaround, in the form's create event, set
AdvSmoothDatePicker.Format := FormatSettings.ShortDateFormat;

The above does not work because the parser in advutil.pas line 4830 is:

function IsFormatSpecifier(const C: Char): Boolean;
begin
Result := CharInSet(C, [
'd', 'M', 'y',
'H', 'h',
'm', 's',
'z', 't'
]);
end;

This is quite uncommon. minutes usually are coded as nn and not as mm

You are correct. It would be better if the minute specifier used the Delphi format standard 'n' and not 'M' used in other typical formatting settings.
We changed it and this improvement will be in the next update.