| Author: satya 30 Oct 2009 | Member Level: Diamond | Rating:    Points: 6 |
to find the day name using javascript:
<script language="javascript" type="text/javascript" > var vDate = new Date(); //09/01/2009" alert( d.getUTCDay()); var day_name=new Array(7); day_name[0]="Sunday" day_name[1]="Monday" day_name[2]="Tuesday" day_name[3]="Wednesday" day_name[4]="Thursday" day_name[5]="Friday" day_name[6]="Saturday"
alert ("Today Day is = " + day_name[vDate.getDay()]);
</script>
|
| Author: Hygeena 30 Oct 2009 | Member Level: Gold | Rating:  Points: 2 |
thank u satya.but i want to find dates between two ranges.how can i do that.plz.
|
| Author: Hygeena 30 Oct 2009 | Member Level: Gold | Rating:  Points: 2 |
my actual requirement is
i have 7 buttons sunday monday tuesday etc....
i want to change the forecolor of those buttons that will come within the selected range.
how to do this using javascript
|
| Author: Gaurav Arora 30 Oct 2009 | Member Level: Diamond | Rating:   Points: 3 |
You can do this using Javascript too
in addition to Satya's code, I am writting the folowing code:
function Elementcolor() { <elementid>.style.color = <your color>; }
Change elementId with your id and your color with your choice of color.
Add this code where you want the change of color
Thanks & regards, Gaurav Arora - Sr. Editor Me in My Own Style
|
| Author: nallamani 30 Oct 2009 | Member Level: Bronze | Rating:  Points: 2 |
var myDate=new Date(); myDate.setFullYear(2009,10,12); var today = new Date(); today.setFullYear(2009,10,15); var betweendate=myDate.getDate()+3
|