We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Select month only using DateTimePicker

Thread ID:





95917 Aug 10,2010 11:13 AM UTC Aug 11,2010 11:05 AM UTC WinForms 1
Tags: Tools
Jonas Westling
Asked On August 10, 2010 11:13 AM UTC

Is there any way to use the DateTimePickerAdv to select only year and month and hide the selection of date from the user?

Lingaraj S [Syncfusion]
Replied On August 11, 2010 11:05 AM UTC

Hi Jonas,

Thank you for your interest in Syncfusion products.

Please try using DateCellQueryInfo event with DataTimePickerAdv to avoid the Date selection as shown below.

private void dateTimePickerAdv1_Calendar_DateCellQueryInfo(object sender, Syncfusion.Windows.Forms.Tools.DateCellQueryInfoEventArgs e)
if (((DateTime)e.DateValue).Day != dateTimePickerAdv1.Value.Day)
e.Style.Enabled = false;
e.Style.Font.Strikeout = true;
e.Style.TextColor = Color.Gray;

Also refer the Knowledgebase article from following link

Please let me know if you have any queries.

Lingaraj S.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon