473,786 Members | 2,660 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

calendar not showing up

56 New Member
Expand|Select|Wrap|Line Numbers
  1. <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
  2.  
  3. <%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  4.     Namespace="System.Web.UI" TagPrefix="asp" %>
  5.  
  6. <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
  7.  
  8. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  9.  
  10. <html xmlns="http://www.w3.org/1999/xhtml" >
  11. <head runat="server">
  12.     <title>Flight Tickets</title>
  13.  
  14.     <script type="text/javascript">
  15.     function onbodyload()
  16.     {
  17.     function checkDate(sender, args)
  18.     {
  19.     if(sender._selectedDate > new Date())
  20.     {
  21.     alert("You cannot select a day earlier than today!");
  22.     sender._selectedDate = new Date();
  23.     sender._textbox.set_Value(sender._selectedDate.format(sender._format))
  24.     }
  25.     }
  26.     }
  27.     </script>
  28. </head>
  29. <body>
  30.     <form id="form1" runat="server">
  31.     <asp:ScriptManager id="ScriptManager1" runat="server" EnableScriptGlobalization="true" EnableScriptLocalization="true" >
  32.     </asp:ScriptManager>
  33.        <div>     
  34.         <table>
  35.     <tr>
  36.     <td><asp:Label ID="lblDep" runat="server" Text="Departure Date"></asp:Label></td>
  37.     <td><asp:TextBox ID="txtDep" runat="server"></asp:TextBox></td>
  38.     <td><asp:Image ID="Cal1" runat="server" ImageUrl="~/Images/calendar.png" ImageAlign="AbsMiddle"   AlternateText="Click here to display calender"/></td>
  39. <td><ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtDep" PopupButtonID="Cal1" OnClientDateSelectionChanged = "checkDate"  >
  40.     </ajaxToolkit:CalendarExtender></td>
  41.     <td><asp:RequiredFieldValidator ID="reqDep" runat="server" Text="*" ControlToValidate="txtDep"></asp:RequiredFieldValidator></td>
  42.      <td><asp:CompareValidator ID="CompareValidator1" runat="server" ControlToValidate="txtDep" ErrorMessage="Invalid Date" Operator="DataTypeCheck" Type="Date"></asp:CompareValidator></td>
  43.      <td><asp:RangeValidator ID="RangeValidator2" runat="server" ControlToValidate="txtDep" ErrorMessage="Range" Type="date"></asp:RangeValidator></td>
  44.      <td><ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" Enabled="true" TargetControlID="CompareValidator1"></ajaxToolkit:ValidatorCalloutExtender></td>
  45.     </tr>
  46.  
  47.     <tr> 
  48.    <td><asp:Label ID="lblRet" runat="server" Text="Return Date"></asp:Label></td>
  49.     <td><asp:TextBox ID="txtRet" runat="server"></asp:TextBox></td>
  50.     <td><asp:Image ID="Cal2" runat="server" ImageUrl="~/Images/calendar.png" ImageAlign="AbsMiddle" AlternateText="Click here to display calender"/></td>
  51.     <td><ajaxToolkit:CalendarExtender ID="CalendarExtender2" runat="server" TargetControlID="txtRet" PopupButtonID="Cal2" OnClientDateSelectionChanged= "checkDate" >
  52.     </ajaxToolkit:CalendarExtender><</td>
  53.     <td><asp:RequiredFieldValidator ID="reqRet" runat="server" text="*" ControlToValidate="txtRet"></asp:RequiredFieldValidator></td>
  54.    <td><asp:CompareValidator ID="CompareValidator2" runat="server" ControlToValidate="txtRet" ErrorMessage="Invalid Date" Operator="DataTypeCheck" Type="Date"></asp:CompareValidator></td>
  55.    <td><asp:RangeValidator ID="RangeValidator1" runat="server" ControlToValidate="txtRet" ErrorMessage="Range" Type="date"></asp:RangeValidator></td>
  56.    <td><ajaxToolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" Enabled="true" TargetControlID="CompareValidator2"></ajaxToolkit:ValidatorCalloutExtender></td>
  57.    </tr>
  58.  
  59.     <tr>
  60.     <td><asp:Button ID="btnFind" runat="server" Text="Find Flights!" /></td>
  61.     </tr>
  62.      </table>
  63.     </div>
  64.  
  65.     </form>
  66. </body>
  67. </html>
  68.  
I CUD NOT UNDERSTAND WHERE THE PROB IS............C ALENDER IS NOT SHOWING UP ...PLS HELP
May 8 '08 #1
1 1568
kenobewan
4,871 Recognized Expert Specialist
This example may help you:
Calendar Demonstration
May 9 '08 #2

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

Similar topics

6
516
by: Mason | last post by:
I have a quick, probably easy, question about Lebans' calendar program. I have a form that allows a user to click on different technicians. When this happens, Lebans' calendar comes up with various dates set to bold based on the technician selected. However, when I close the calendar and select a different technician, the bold dates carry over from the previous technician selected. I can't find a way to clear the bold days after the...
7
4511
by: Steve | last post by:
Can someone recommend a way to display a one-month calendar view where the month can be selected and up to six events can be shown in any day of the calendar. The events and dates would be stored in an events table and any event may be for one day or multiple days. Thanks! Steve
16
3061
by: DFS | last post by:
If you're listening, I want the middle of the calendar (showing 1 month) to open below the cursor position. It currently opens just to the right and below the cursor position. I hunted through the code, but can't determine what to alter. Very nice piece of work, by the way. Thanks
7
6248
by: Vincent | last post by:
Does anyone know of any good 3rd party calendar controls that can be used in VBA? I am trying to find a calendar control that will allow you to select multiple dates at once or a range of dates, such as a week or month. Thanks.
9
5821
by: Greg | last post by:
Hi, I have a table with "dates", i'd like to display those dates on a calendar. I've put a calendar in a form, linked to my "date" field, and it works, but only showing one "date" per calendar. I can see all "dates" moving to next records, but one per calendar. :-( Ex: 17/06 on one claendar, then if i click on next record, I can see my calendar with 24/06 ...etc ...
2
5554
by: J | last post by:
Hello. Our programmer created a VS2005 Crystal Report that uses the calendar control. It seems to work fine when viewed locally but when we publish it to the web server which is W2K Server the Calendar control's image is not showing with a red X and some text box fields look like they're enabled but can't click on to them. Does anyone know what we need to do to make the Calendar control and other text box fields work when we publish...
6
1960
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 combo box on the form and have bound the control to the Date Reported field. I have placed the calendar control on the form and set the Visible property to no. The following code has bee added to the Mouse Down Event of the Date
3
2743
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 assist with this. Thanks in advance. 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.
7
1728
by: pankajit09 | last post by:
Hello, I have developed a calendar program in Javascript which opens a calendar as a popup window and when a user clicks on a date the date is copied into the parent windows textbox. The code of the parent window is as follows --> <html> <head> <title>calendar</title> </head>
14
2259
by: magmike | last post by:
Can I do anything with the calendar buttons? I want to display a number on the buttons. I'm using the calendar control on a form that sets a call back date and time. The user can click on the calendar if they wish to set the date in the date field. It also serves the purpose of using a calendar. Also on that form, I have a subform that shows a query which shows the count of call backs set for each date. I would like to be able to...
0
9497
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10169
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9964
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6749
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.