Ask a Question related to ASP.NET General, Design and Development.
-
Merex #1
Using Calendar as a popup
Hello all,
I want to use the Calendar control as a popup window. I would like
each day's link to execute some javascript which would set the value
of a textbox on the window which opened the calendar and then close
the calendar window. So basically I want to customize the <A> tag for
each date to call my custom JavaScript function.
function SelectedDate(strDate) {
window.opener.document.forms["frmMain"].elements["txtDate"].value =
strDate;
}
Can anyone point me in the right direction. I am thinking that I
might be able to hook into some event that the calendar generates...
Thanks,
Ross
Merex Guest
-
2006 calendar needed for photo calendar
I want to start work on a 2006 calendar featuring my own photographs. In Photoshop there used to be a calendar-creating feature that worked well,... -
Javascript PopUp using Calendar Control
How can I implement the Calendar Control in a popup Window so that when a user selects a date that the selected date is passed into a textbox on the... -
how to refresh page after date selection from popup calendar?
If you are using window.open to popup the calendar, then before closing the popup you can use 'opener ' handler which gives you the parent page to... -
asp.net calendar popup control -- Loosing hair
Check out this article, http://www.microsoft.com/india/msdn/articles/PopupCalendarinASP.aspx -- Saravana Microsoft India Community Star,... -
popup calendar helper
Can anyone direct me to any resource or explain how to use the following calendar helper within Dreamweaver 4.0? This was written for MX, which I... -
S. Justin Gengo #2
Re: Using Calendar as a popup
Merex,
I'm not certain if you can easily hook this up to the calendar itself so
that it all executes client side. How about using the body tag a server
control and placing your script into its onload event. Doing so would
require that the calendar post back when a value is selected but it would
then function exactly as you are attempting.
If you decide to go this route I have some sample code in the code library
of my site, [url]www.aboutfortunate.com[/url], that shows how to use the body tag as a
server control. Just search the code library for: "use the body tag as a
server control" or something similar.
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
[url]www.aboutfortunate.com[/url]
"Out of chaos comes order."
Nietzche
"Merex" <merex@cox.net> wrote in message
news:f734ed08.0308070535.1a99205d@posting.google.c om...> Hello all,
>
> I want to use the Calendar control as a popup window. I would like
> each day's link to execute some javascript which would set the value
> of a textbox on the window which opened the calendar and then close
> the calendar window. So basically I want to customize the <A> tag for
> each date to call my custom JavaScript function.
>
> function SelectedDate(strDate) {
> window.opener.document.forms["frmMain"].elements["txtDate"].value =
> strDate;
> }
>
> Can anyone point me in the right direction. I am thinking that I
> might be able to hook into some event that the calendar generates...
>
> Thanks,
> Ross
S. Justin Gengo Guest
-
Ravikanth[MVP] #3
Using Calendar as a popup
Hi
Check out this may help you.
[url]http://www.excentricsworld.com/customcontrols.aspx?id=7[/url]
Ravikanth[MVP]
would like>-----Original Message-----
>Hello all,
>
>I want to use the Calendar control as a popup window. Iset the value>each day's link to execute some javascript which wouldthen close>of a textbox on the window which opened the calendar andthe <A> tag for>the calendar window. So basically I want to customize["txtDate"].value =>each date to call my custom JavaScript function.
>
>function SelectedDate(strDate) {
> window.opener.document.forms["frmMain"].elementsthinking that I>strDate;
>}
>
>Can anyone point me in the right direction. I amgenerates...>might be able to hook into some event that the calendar>
>Thanks,
>Ross
>.
>Ravikanth[MVP] Guest
-
jayuya #4
Using Calendar as a popup
Ross,
There was a posting related to this about 3 or 6 weeks
ago. Search for calendar control or popups. The code
sample was posted by savarana from Miscrosoft india, she
has a really good sample code of what you are looking for.
I think she implemented a custom coontrol to do so. If not
I will email again as soon as I find the web link of it.
but if you find it posted again so that we can all have
the link to the sample calendar control..
thanks,
jayuya
would like>-----Original Message-----
>Hello all,
>
>I want to use the Calendar control as a popup window. Iset the value>each day's link to execute some javascript which wouldthen close>of a textbox on the window which opened the calendar andthe <A> tag for>the calendar window. So basically I want to customize["txtDate"].value =>each date to call my custom JavaScript function.
>
>function SelectedDate(strDate) {
> window.opener.document.forms["frmMain"].elementsthinking that I>strDate;
>}
>
>Can anyone point me in the right direction. I amgenerates...>might be able to hook into some event that the calendar>
>Thanks,
>Ross
>.
>jayuya Guest
-
Saravana #5
Re: Using Calendar as a popup
Check out this article ( this was the article mentioned by jayuya)
[url]http://www.microsoft.com/india/msdn/articles/PopupCalendarinASP.aspx[/url]
or
[url]www.extremeexperts.com/net/articles[/url] (For more articles on .NET)
--
Saravana
Microsoft India Community Star,MC**
[url]www.extremeexperts.com[/url]
"jayuya" <jayuya@cox.net> wrote in message
news:0c9901c35d08$be2fefc0$a601280a@phx.gbl...> Ross,
> There was a posting related to this about 3 or 6 weeks
> ago. Search for calendar control or popups. The code
> sample was posted by savarana from Miscrosoft india, she
> has a really good sample code of what you are looking for.
> I think she implemented a custom coontrol to do so. If not
> I will email again as soon as I find the web link of it.
> but if you find it posted again so that we can all have
> the link to the sample calendar control..
>
> thanks,
> jayuya
>
>
>> would like> >-----Original Message-----
> >Hello all,
> >
> >I want to use the Calendar control as a popup window. I> set the value> >each day's link to execute some javascript which would> then close> >of a textbox on the window which opened the calendar and> the <A> tag for> >the calendar window. So basically I want to customize> ["txtDate"].value => >each date to call my custom JavaScript function.
> >
> >function SelectedDate(strDate) {
> > window.opener.document.forms["frmMain"].elements> thinking that I> >strDate;
> >}
> >
> >Can anyone point me in the right direction. I am> generates...> >might be able to hook into some event that the calendar> >
> >Thanks,
> >Ross
> >.
> >
Saravana Guest
-
Merex #6
Re: Using Calendar as a popup
Thanks for all the replys. I made it work not long after posting
this.
protected void onDayRender(object sender,
System.Web.UI.WebControls.DayRenderEventArgs e) {
DateTime dtDate = e.Day.Date;
e.Cell.Controls.Clear();
HtmlAnchor anchor = new HtmlAnchor();
anchor.HRef="Javascript:SelectDate('"+dtDate.ToStr ing("MM/dd/yyyy")+"')";
anchor.InnerHtml = Convert.ToString(dtDate.Day);
e.Cell.Controls.Add(anchor);
}
Thanks,
Ross
Merex Guest



Reply With Quote

