Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 519
  • Last Modified:

Date Picker Control - Locking/Unlocking

How do you lock/unlock the Date Picker Control?  There is no LOCKED property for the Date Picker Control.

Sheila
0
baileys
Asked:
baileys
  • 3
  • 2
1 Solution
 
hesCommented:
To lock the date use the following

DTPicker1.MaxDate = Now
DTPicker1.MinDate = Now

or instead of Now the date you want it locked to.

To unlock

DTPicker1.MaxDate = "12/31/9999"
DTPicker1.MinDate = "01/01/1601"
0
 
baileysAuthor Commented:
That works to lock the control, but I also want to disable the dropdown calendar.

Sheila
0
 
hesCommented:
dtpicker1.UpDown =True
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
damienmCommented:
Why don't you set the datepickers enabled property to false.

dtPicker.enabled = false
0
 
baileysAuthor Commented:
If I set the enabled to false, the dates are shaded.
0
 
baileysAuthor Commented:
Thanks, that worked.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now