473,406 Members | 2,217 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,406 software developers and data experts.

One more quick calendar question

Sue
document.GetElementByID(thiscalendarcontrol_ID).se lecteddate doesn't grab the
selected date from the given calendar (client-side), nor does .value or
..test. What's the magic syntax? I'm seeing some google search results that
say this can't be done with the Calendar control?!

tia,
Sue
Nov 19 '05 #1
4 1079
On Tue, 14 Jun 2005 18:21:02 -0500, Sue <Su*@ojd.state.or.us> wrote:
document.GetElementByID(thiscalendarcontrol_ID).se lecteddate doesn't
grab the
selected date from the given calendar (client-side), nor does .value or
.test. What's the magic syntax? I'm seeing some google search results
that
say this can't be done with the Calendar control?!

tia,
Sue


The calendar isn't really a control as far as DOM/javascript is
concerned. It's really just a table with a bunch of links. To use
getElementById, a tag has to have an id= set, which nothing inside the
calendar table does. Take a look at the HTML and you'll see what I mean.
If you have a pre-selected date, you'll notice there are some styles set
on it according to the formatting specified for the look of your
calendar. You could try to parse the innerHtml of the calendar table with
regex or something, I guess.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #2
> You could try to parse the innerHtml of the calendar table with regex or
something, I guess.


Doh, or use DOM and/or xpath...


--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #3
Sue
Sigh. That's not what I wanted to hear. Thanks for the info - at least I can
stop chasing my tail. Guess I'll have to look outside of MS for this one...

Sue

"Craig Deelsnyder" wrote:
On Tue, 14 Jun 2005 18:21:02 -0500, Sue <Su*@ojd.state.or.us> wrote:
document.GetElementByID(thiscalendarcontrol_ID).se lecteddate doesn't
grab the
selected date from the given calendar (client-side), nor does .value or
.test. What's the magic syntax? I'm seeing some google search results
that
say this can't be done with the Calendar control?!

tia,
Sue


The calendar isn't really a control as far as DOM/javascript is
concerned. It's really just a table with a bunch of links. To use
getElementById, a tag has to have an id= set, which nothing inside the
calendar table does. Take a look at the HTML and you'll see what I mean.
If you have a pre-selected date, you'll notice there are some styles set
on it according to the formatting specified for the look of your
calendar. You could try to parse the innerHtml of the calendar table with
regex or something, I guess.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 19 '05 #4
As long as you're still looking, here's a full-featured ASP.NET calendar:

http://www.quickwebsoft.com/EventCal...tCalendar.aspx

-HTH
"Sue" <Su*@ojd.state.or.us> wrote in message
news:C3**********************************@microsof t.com...
Sigh. That's not what I wanted to hear. Thanks for the info - at least I
can
stop chasing my tail. Guess I'll have to look outside of MS for this
one...

Sue

"Craig Deelsnyder" wrote:
On Tue, 14 Jun 2005 18:21:02 -0500, Sue <Su*@ojd.state.or.us> wrote:
> document.GetElementByID(thiscalendarcontrol_ID).se lecteddate doesn't
> grab the
> selected date from the given calendar (client-side), nor does .value or
> .test. What's the magic syntax? I'm seeing some google search results
> that
> say this can't be done with the Calendar control?!
>
> tia,
> Sue


The calendar isn't really a control as far as DOM/javascript is
concerned. It's really just a table with a bunch of links. To use
getElementById, a tag has to have an id= set, which nothing inside the
calendar table does. Take a look at the HTML and you'll see what I mean.
If you have a pre-selected date, you'll notice there are some styles set
on it according to the formatting specified for the look of your
calendar. You could try to parse the innerHtml of the calendar table
with
regex or something, I guess.

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Nov 19 '05 #5

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

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...
3
by: | last post by:
Hi all, I am new to .net so I am still unsure how to do thing, but I have discovered a class called HebrwCalendar and I am so excited that I must ask if someone can help me. First, I assume this...
0
by: hugo | last post by:
I need urgent help with this program: Using C, write a calendar progam so that the user provides only a year. The program should print a calendar for the given year to the file calendar.dat. The...
13
by: alvinwoon | last post by:
URL: http://events.unl.edu/ Description: i coded a quick and dirty key navigation for the calendar. if you press left arrow on your keyboard, it will navigate to the previous date and fire an...
2
by: kev670 | last post by:
I'm creating a calendar calculator. i can't get my final function firstDayOfMonth to work. i have been able to calculate the amount of days between 2 dates but now i need to find where the first day...
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...
1
by: romeorion | last post by:
Hey, I'm redesigning the home page for my university department, and would like to know if anyone has a good css framework to work with. The page would require a navigation table (doesn't matter if...
0
by: abhishekbrave | last post by:
Hi, I have to reuse the code given below for displaying a calendar according to the month and year specified by user ...currently this code is fetching systme date and genrating calendar for that......
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.