Ticket CQ60183
Visible to All Users

Can I use a DateEdit to select only month and Year instead of a specific date?

created 18 years ago

Hello - I have an application where the user chooses a month-year, ex. January 2007.

Is there a way to modify the Date Edit control to not choose a day, only month and year? I would like to have the calendar dropdown without the days selection, only the month and year. I think it would be confusing for my users to select a specific date and then only see a month/year masking in the text field.
If no, is there a way to do this using one control instead of two like MonthEdit and SpinEdit for the year?

Thanks!
David

Comments (1)
DevExpress Support Team 18 years ago

    Hello Dean,
    Unfortunately, DateEdit control doesn't provide you the ability to customize it according to the requirements you specified. However, I suggest that you use an alternative approach and utilize PopupContainerControl and PopupContainerEdit controls in this instance. For example, you can place the ComboBoxEdit and SpinEdit within the PopupContainerControl, then handle the PopupContainerEdit.QueryResultValue event to collect the selected values. I've created a small example to illustrate this approach in action. Also, you can refer to the following Knowledge Base article: "How to close the dropdown window of PopupContainerEdit with value saving" (www.devexpress.com/kbA2357).
    Please refer to the attachment and feel free to contact me in case of any difficulty. I'll be glad to help you.
    Thank you,
    Alex.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.