Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question about DtPicker

Status
Not open for further replies.

Hulisi

Programmer
Jan 28, 2001
31
TR
hi.
how can i fix DtPicker's day part?
i want it is unchangeable for user..
can you help me.
thanks...
 
Hi Hulisi:

If I want to force a particular day of the week, I use something like the following:

Code:
    Private Sub dtpWeekly_CloseUp()
        ' Force the date in the DateTimePicker to Monday.
        dtpWeekly.DayOfWeek = 2
    End Sub
/[code]

If you want a particular day of the month (for example, the 21st), then one can do something like:

[code]
    Private Sub dtpWeekly_CloseUp()
        ' Force the date in the DateTimePicker to the 21st.
        dtpWeekly.Day = 21
    End Sub
/[code]

HTH,
Cassandra
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top