ASP.NET javascript Calenter Control [modified]
-
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
-
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
-
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
maybe he or she is a churchman ?haha
my english is very bad!
-
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
Looks to me like somebody is trying to store snippets in CodeProject.
Deja View - the feeling that you've seen this post before.