[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

calendar control only allows to choose month and year

Posted on 2006-04-03
6
Medium Priority
?
433 Views
Last Modified: 2008-03-10
I have an asp.net page which let customer choose their request date. But due to business rule, the request date has to be always on the 1st day of calendar month. Basically it means customer could only choose the month and year, not the day. Is there a way to achieve that by using calendar control? Thanks!
0
Comment
Question by:pumaken68
3 Comments
 
LVL 5

Expert Comment

by:Darth_helge
ID: 16368032
what's the point with the calendar control then?
You could instead create two dropdownlists (or one) containing month and year.
0
 
LVL 12

Accepted Solution

by:
bsdotnet earned 2000 total points
ID: 16368861
Use this to show always 1st day of the calendar month chosen.

    Protected Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs)
        Calendar1.SelectedDate = DateSerial(Year(Calendar1.SelectedDate), Month(Calendar1.SelectedDate), 1)
        Calendar1.TodaysDate = DateSerial(Year(Calendar1.SelectedDate), Month(Calendar1.SelectedDate), 1)
    End Sub
0
 

Author Comment

by:pumaken68
ID: 16388159
Thanks Darth_helge, your comment makes sense. That's what we did in ASP. Now converting to asp.net, we just want to make use of calendar control as much as possible.

Thanks bsdotnet, we've achieved what you said using C#.
But it looks a bit weird. easily confusing customers.
Are there any calandar control available which only lets you choose month and year?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Loops Section Overview
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question