473,569 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: DatePicker

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
2 2036

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.Add Months(1).AddDa ys(-1)

--
Larry Lard
Replies to group please

Mar 31 '06 #2
Hi Larry

Many thanks for that.

Geoff

"Larry Lard" <la*******@hotm ail.com> wrote in message
news:11******** *************@i 39g2000cwa.goog legroups.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.Add Months(1).AddDa ys(-1)

--
Larry Lard
Replies to group please

Apr 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1911
by: Always Learning | last post by:
Hi Guys, I have a form field of type datepicker. I want to include it in my get string. like this: Response.Redirect("writetodb.asp?Name=" + Textbox1.Text + "&Telephone=" + TextBox2.Text + "&DateFrom=" + DatePickVar.Text) I keep getting a error when I build stating: Name 'DatePickVar' is not declared. But I have set the id in properties...
27
2123
by: Simon Templar | last post by:
Hi, I am trying to introduce a multiple datepicker into a webpage and the problem arises with the second picker. I tried to copy and adapt the code I employed for the first one, renaming the variables but it is simply unable to output any date to the database. The code for the first picker (which works fine) is as follows:
0
1729
by: Deano | last post by:
Hi, May have asked this before but haven't got anywhere with this. I have a datepicker constructed from a form i.e it's not an ActiveX control. On my date controls I have this line in the double-click event, that calls the datepicker; =PopupCalendar(Screen.ActiveControl)
7
16998
by: Malcolm Webb | last post by:
I use the Microsoft Access Calendar (ActiveX) to pass dates into queries and reports. I have recently come across the Microsoft Access DatePicker developed by Brendan Kidwell and I now use this to input dates into various text boxxes on my forms. One form has the capacity for over 20 different dates and using the DatePicker is far easier...
2
1735
by: flipdoubt | last post by:
What do most people use for a DatePicker and is a DatePicker included in ASP.NET 2.0? I've seen some of the commercial products out there, but the redistributable license for most of them is too steep. Seems like a lot for one simple control. Suggestions
0
1288
by: Armand | last post by:
Hi All, is anyone of you have any good resource about implementing datepicker that is binded into asp:textbox control? I do have a client side datepicker in JS, but it is binded to html input tag. Do you know how to bind JS to asp:textbox control? Thanks for all of your input, I really appreciate it
2
2109
by: Vbbeginner07 | last post by:
How to display current date in a datepicker where once we have loaded the datepicker onto form it shows current date,but after some days it shows only the date when it was loaded onto the form,please ny suggestions to get the current date always inspite of the date loaded being shown!!!
2
2760
by: stainless | last post by:
I have a date selection field that can be blank OR set to a valid future date. I am thinking of using a datepicker field but have one issue with this. If I have a check box in the datepicker that can be unticked to represent no date selected, whatever is the default or last date selected previously is still displayed in the text display...
6
6988
by: ichibon | last post by:
Hi, I have trouble setting the position of the DatePicker, a control from WPF Toolket June 2009 release. When click on the DatePicker control, the Calendar always open as a drop down and expands to the right, but the Calendar goes out of bound as the DatePicker control is aligned to the Right of the screen. Since I cannot change the...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7618
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8132
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7678
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7982
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6286
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5222
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3644
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.