Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. ASP.NET javascript Calenter Control [modified]

ASP.NET javascript Calenter Control [modified]

Scheduled Pinned Locked Moved ASP.NET
javascriptcsharpcssasp-netdata-structures
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 2247430
    wrote on last edited by
    #1

    ASP.NET Javascript Calander Contol You have easly create to webform.. I have given to code from here. Please read and following on Steps Step 1: First You will create "Cal.js" from Javascripts file.. Step 2: Next You will create "Cal.css" from Style sheet file.. Step 3: after you will create from "Cal.ascx" in you ASP.NET User Contorl.. Step 4: Finally you have create from "Cal.aspx" in you ASP.NET WebForm.. Step 1: First you have create one Javascript and save from "cal.js" /* Authors: Yesudas S, Raja Lingam Company: IDenizen Smartware Pvt Ltd Date: 07 Aug 2007 */ var months = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); var days = new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"); var monthsArr = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); today = new getToday(); var element_id; //var selectedDay,selectedMonth,selectedYear; function getDays(month, year) { // Test for leap year when February is selected. if (1 == month) return ((0 == year % 4) && (0 != (year % 100))) || (0 == year % 400) ? 29 : 28; else return daysInMonth[month]; } function getToday() { // Generate today's date. this.now = new Date(); this.year = this.now.getFullYear() ; // Returned year XXXX this.month = this.now.getMonth(); this.day = this.now.getDate(); } function newCalendar() { var parseYear = parseInt(document.all.year [document.all.year.selectedIndex].text); var newCal = new Date(parseYear , document.all.month.selectedIndex, 1); var day = -1; var startDay = newCal.getDay(); var daily = 0; today = new getToday(); // 1st call if ((today.year == newCal.getFullYear() ) && (today.month == newCal.getMonth())) day = today.day; // Cache the calendar table's tBody section, dayList. var tableCal = document.all.calendar.tBodies.dayList; var intDaysInMonth = getDays(newCal.getMonth(), newCal.getFullYear() ); for (var intWeek = 0; intWeek < tableCal.rows.length; intWeek++) for (var intDay = 0; intDay < tableCal.rows[intWeek].cells.length; intDay++) { var cell = tableCal.rows[intWeek].cells[intDay]; // Start counting days. if ((intDay == startDay) && (0 == daily)) da

    P 1 Reply Last reply
    0
    • M Member 2247430

      ASP.NET Javascript Calander Contol You have easly create to webform.. I have given to code from here. Please read and following on Steps Step 1: First You will create "Cal.js" from Javascripts file.. Step 2: Next You will create "Cal.css" from Style sheet file.. Step 3: after you will create from "Cal.ascx" in you ASP.NET User Contorl.. Step 4: Finally you have create from "Cal.aspx" in you ASP.NET WebForm.. Step 1: First you have create one Javascript and save from "cal.js" /* Authors: Yesudas S, Raja Lingam Company: IDenizen Smartware Pvt Ltd Date: 07 Aug 2007 */ var months = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31); var days = new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"); var monthsArr = new Array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); today = new getToday(); var element_id; //var selectedDay,selectedMonth,selectedYear; function getDays(month, year) { // Test for leap year when February is selected. if (1 == month) return ((0 == year % 4) && (0 != (year % 100))) || (0 == year % 400) ? 29 : 28; else return daysInMonth[month]; } function getToday() { // Generate today's date. this.now = new Date(); this.year = this.now.getFullYear() ; // Returned year XXXX this.month = this.now.getMonth(); this.day = this.now.getDate(); } function newCalendar() { var parseYear = parseInt(document.all.year [document.all.year.selectedIndex].text); var newCal = new Date(parseYear , document.all.month.selectedIndex, 1); var day = -1; var startDay = newCal.getDay(); var daily = 0; today = new getToday(); // 1st call if ((today.year == newCal.getFullYear() ) && (today.month == newCal.getMonth())) day = today.day; // Cache the calendar table's tBody section, dayList. var tableCal = document.all.calendar.tBodies.dayList; var intDaysInMonth = getDays(newCal.getMonth(), newCal.getFullYear() ); for (var intWeek = 0; intWeek < tableCal.rows.length; intWeek++) for (var intDay = 0; intDay < tableCal.rows[intWeek].cells.length; intDay++) { var cell = tableCal.rows[intWeek].cells[intDay]; // Start counting days. if ((intDay == startDay) && (0 == daily)) da

      P Offline
      P Offline
      pmarfleet
      wrote on last edited by
      #2

      Fascinating. Did you forget to ask a question?

      Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

      S P 2 Replies Last reply
      0
      • P pmarfleet

        Fascinating. Did you forget to ask a question?

        Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

        S Offline
        S Offline
        suyuan1984
        wrote on last edited by
        #3

        maybe he or she is a churchman ?haha

        my english is very bad!

        1 Reply Last reply
        0
        • P pmarfleet

          Fascinating. Did you forget to ask a question?

          Paul Marfleet "No, his mind is not for rent To any God or government" Tom Sawyer - Rush

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          Looks to me like somebody is trying to store snippets in CodeProject.

          Deja View - the feeling that you've seen this post before.

          My blog | My articles

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups