Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - Setting Default Dates
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Setting Default Dates

 Post Reply Post Reply
Author
Message
LittleJK View Drop Down
Senior Member
Senior Member
Avatar

Joined: 13 April 2006
Status: Offline
Points: 168
Post Options Post Options   Thanks (0) Thanks(0)   Quote LittleJK Quote  Post ReplyReply Direct Link To This Post Topic: Setting Default Dates
    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

Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post 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
 
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.