473,320 Members | 1,910 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

calendar control

Hi,

I am using asp calendar control in my application and i'm expecting the selected date as todays date from it during the page load.But instead it is giving me the selected date as "12:00:00 AM" instead of "todays date"(asp calendar control selected date will be todays date by default.we can change it in its properties).

I can use the below stmt to get the todays
date .

calendar1.selecteddate=system.datetime.today

But,I have got some condition like this.

if calendar1.selectedate.date=system.datetime.today then
obj=system.datetime.today
else
obj=calendar1.selectedate.date
end if

If i assign system date to calendar1.selecteddate.date,then this condition wont work for me properly.

The problem is that if i click previous or next months date,it is not giving me those dates if i assign system date to the calendar.selecteddate

So,can any one please give me a solution for this.

Thanks,
Saichaitanya
Sep 18 '07 #1
2 1246
kenobewan
4,871 Expert 4TB
I am not sure what you are trying to achieve. Why give the calendar a default date?
Sep 18 '07 #2
Hi,

create a button. and in that button event, paste the code below.

Me.Calendar1.TodaysDate = Me.Calendar1.SelectedDate
Response.Write(Me.Calendar1.TodaysDate)

you can set the todays's date of the calendar object to the date selected by the user.

regards,
Ruel Sucgang

================================================== ======

Hi,

I am using asp calendar control in my application and i'm expecting the selected date as todays date from it during the page load.But instead it is giving me the selected date as "12:00:00 AM" instead of "todays date"(asp calendar control selected date will be todays date by default.we can change it in its properties).

I can use the below stmt to get the todays
date .

calendar1.selecteddate=system.datetime.today

But,I have got some condition like this.

if calendar1.selectedate.date=system.datetime.today then
obj=system.datetime.today
else
obj=calendar1.selectedate.date
end if

If i assign system date to calendar1.selecteddate.date,then this condition wont work for me properly.

The problem is that if i click previous or next months date,it is not giving me those dates if i assign system date to the calendar.selecteddate

So,can any one please give me a solution for this.

Thanks,
Saichaitanya
Sep 20 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Tim Graichen | last post by:
Hello, I am making use of the Active X calendar control (mscal.Calendar.7) in several places in my main form, with the following code Below is an example of the code I'm using for the...
5
by: Miguel Dias Moura | last post by:
Hello, i am trying to create a .css file with several styles and apply them to the calendar control so i can change the look of: 1. Text Type and Format (Bold, Underline, etc) 2. Background...
1
by: bill yeager | last post by:
I would like to place the currently selected date (retrieved from the database) on a calendar control which is embedded inside a datagrid. However, I can't find the ID of the control to do so....
0
by: maxrawson | last post by:
First, let me start by saying my asp.net experience is still in it's infancy so please bare with me as I try to explain my situation. I have created a single page that with the use of many...
2
by: Caesar Augustus | last post by:
First, let me start by saying my asp.net experience is still in it's infancy so please bare with me as I try to explain my situation. I have created a single page that with the use of many...
3
by: Peter | last post by:
Is there anyway to make the System.Web.UI.WebControls.Calendar to display only Month Name and Year, like: January, 2006 February, 2006 ..... .... .... ....
3
by: =?Utf-8?B?UGFycm90?= | last post by:
I applied the following Ajax code in my web page which has a calendar control to keep my page from completely reloading everytime something was changed. <atlas:ScriptManager ID="ScriptManager1"...
7
by: John Kotuby | last post by:
Hi all, I am trying to use a calendar server control which I have ID="Calendar1" in the source code. What I am trying to do is emulate a JavaScript calendar that was being used in an older ASP...
6
by: thorpk | last post by:
I have an access database that i have added a pop up calendar to, the Table information for the Date Reported field is Date/Time format short date, input mask is 00/00/0000. i have created a...
3
by: thorpk | last post by:
I posted this problem earlier in the month and some one decided it was better to change the subject and ask a completely different question. I am therefore reposting. I am hoping some one can...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.