|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Q: DatePickerHi
Can anybody help me with setting the allowable Max and Min date for a DatePicker? I would like to restrict the possible date selections to a given month. So for example, if I were to specify Jan 06 the datepicker could not display days Feb 06 i.e. the arrows for next month and earlier month would not do anything. I understand that I could use DatePicker MinDate and MaxDate but how do I set these without explicitly setting, for example, 01/01/06 - 31/01/06. Thanks in advance Geoff G .Net wrote:
> Hi ' to restrict a DatePicker named dtp to the month of:> > Can anybody help me with setting the allowable Max and Min date for a > DatePicker? > > I would like to restrict the possible date selections to a given month. So > for example, if I were to specify Jan 06 the datepicker could not display > days Feb 06 i.e. the arrows for next month and earlier month would not do > anything. > > I understand that I could use DatePicker MinDate and MaxDate but how do I > set these without explicitly setting, for example, 01/01/06 - 31/01/06. Dim month As Integer = 1 Dim year As Integer = 2006 dtp.MinDate = New Date(year, month, 1) dtp.MaxDate = dtp.MinDate.AddMonths(1).AddDays(-1) -- Larry Lard Replies to group please Hi Larry
Many thanks for that. Geoff Show quoteHide quote "Larry Lard" <larryl***@hotmail.com> wrote in message news:1143811641.063552.91390@i39g2000cwa.googlegroups.com... > > G .Net wrote: >> Hi >> >> Can anybody help me with setting the allowable Max and Min date for a >> DatePicker? >> >> I would like to restrict the possible date selections to a given month. >> So >> for example, if I were to specify Jan 06 the datepicker could not display >> days Feb 06 i.e. the arrows for next month and earlier month would not do >> anything. >> >> I understand that I could use DatePicker MinDate and MaxDate but how do I >> set these without explicitly setting, for example, 01/01/06 - 31/01/06. > > ' to restrict a DatePicker named dtp to the month of: > Dim month As Integer = 1 > Dim year As Integer = 2006 > > dtp.MinDate = New Date(year, month, 1) > dtp.MaxDate = dtp.MinDate.AddMonths(1).AddDays(-1) > > -- > Larry Lard > Replies to group please >
Help Needed WIth Printing BN.NET 2005
Patterns anyone? How do I detect a form being opened already From VB.NET to Word 2003 dll not reading .config ? How can I get caption of all open windows?? VB 2005 variable declaration syntax Calling DLL atruntime Passing Vb equivilent of "structs" between forms settings.settings ?? |
|||||||||||||||||||||||