By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,743 Members | 1,028 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,743 IT Pros & Developers. It's quick & easy.

Q: DatePicker

P: n/a
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.

Thanks in advance

Geoff
Mar 31 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

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

Mar 31 '06 #2

P: n/a
Hi Larry

Many thanks for that.

Geoff

"Larry Lard" <la*******@hotmail.com> wrote in message
news:11*********************@i39g2000cwa.googlegro ups.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

Apr 1 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.