Print Page | Close Window

Setting Default Dates

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Property Grid
Forum Description: Topics Related to Codejock Property Grid
URL: http://forum.codejock.com/forum_posts.asp?TID=9708
Printed Date: 19 May 2024 at 3:11pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Setting Default Dates
Posted By: LittleJK
Subject: Setting Default Dates
Date Posted: 26 February 2008 at 10:45am
Hi I was wondering if anyone has been able to do this:


By default, the Property Grid item is blank (without a date) when clicked to show the calendar with Today's Date. In numerous locations we have property grids that contain a "start date" date item, and "end date" date item.

A client asked if it's possible when entering a start date and an end date in the property grid that the dt picker calendars will not default to today but to the same month/year the user has first selected.

Example: Start Date 11/1/2009, after picking that date the user would then click on the End Date to select 11/3/2009,the calendar will show today, then the user will have to change the year and month to match the start date.

Thanks




Replies:
Posted By: Aaron
Date Posted: 08 March 2008 at 9:09am
Hi,
 
When you select a propertygrid item the calendar does select the date value of the propertygrid item. I don't know why your calendar shows today's value?! Mine does, strange...
 
 
Then in the RequestEdit event you could set the end date as the begin date. (This could be a property setting for the user)
 
Private Sub wndPropertyGrid_RequestEdit(ByVal Item As XtremePropertyGrid.IPropertyGridItem, Cancel As Boolean)
    Select Case Item.Id
        Case ID_ENDDATE
            Dim propItemDate As PropertyGridItemDate
            Set propItemDate = wndPropertyGrid.FindItem(ID_BEGINDATE)
            wndPropertyGrid.Selected.Value = propItemDate
    End Select
End Sub
 
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net