Changing the Font and Color properties of Calendar within DateTimePicker.

0
0

Hi,

Is there a way to change the default font and color of Month Calendar in DateTimePicker? I’m looking for Wisej equivalent of  Winforms Properties – CalendarFont, CalendarForeColor, CalendarTitleBackColor? Can you please share a sample on how to change the style?

Thanks,

Sathya S

  • You must to post comments
0
0

Hi Behzad,

The best way to change the appearance of one Control is to have a custom appearance key set to it.

However, you’ll have to use a Code editor in addition to the ThemeBuilder.

You’ll need to have a new set of appearances for both the “DateChooser” and “DateField”. These two components make the DateTimePicker you see in your application.

You can assign two completely different names to them, but make sure to adjust the DateField.List “inherit” property to your new name for the DateChooser.

As for the missing properties, you’ll have to edit the DateChooser.Day appearance, from what I understood it’s about the tile colors of the calendar, where the tile is the “Day” in the calendar.

To make it a bit simpler, I wrapped up a sample for you. please see dateTimePicker2 in Window1.cs, Default.json, and the new appearances “customDateChooser” and “customDateTimePicker”

If you need additional help with theming your application, we offer Professional Services that you can check out!

HTH,
Alaa

//

  • You must to post comments
0
0

Hello Frank,

Thanks for your response. Setting up at the Theme level sets the Calendar property for the whole form. Is there a way to set the properties at control level within the form? We usually create the DateTimePicker control at runtime and hence wouldn’t know the number of DateTimePicker controls beforehand and each will have it’s own appearance.

Also, I’m trying to map the Winform Calendar properties with Wisej. I couldn’t find all the Calendar properties within the “name” dropdown in Wisej Theme builder. Can you please help me map the missing items?

  • CalendarTrailingForeColor – ??
  • CalendarMonthBackground – backgroundColor
  • CalendarTitleForeColor – ??
  • CalendarTitleBackColor – ??
  • CalendarForeColor – textColor
  • CalendarFont – font

Thanks

Sathya S

  • You must to post comments
0
0

Hi Behzad,

this can be achieved with Theming and our Theme Builder. Either create a custom theme or a mixin and modify the Datefield.List definitions:

date1

date2

Best regards
Frank

Attachment
  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.