Hi, I am trying to integrate the calendar into a form, I want to allow users to pick a date and submit the selection, how can I do this?
Thanks a lot!
function activate_dates(){
// add custom events here - eg to update booking form
}
function activate_dates(){
var dateStart=document.id('date');
$$('li.clickable').each(function(el){
if(!el.hasClass('booked')){
el.addEvent('click',function(){
dateStart.set('value',this.id);
}).setStyle('cursor','pointer');
}
})
}
function activate_dates(){
// add custom events here - eg to update booking form
var dateStart=parent.document.getElementById('date');
$$('li.clickable').each(function(el){
if(!el.hasClass('booked')){
el.addEvent('click',function(){
dateStart.set('value',this.id);
}).setStyle('cursor','pointer');
}
})
}
}
// make the dates clickable
function activate_dates(){
var dateStart=document.id('dateStart');
var dateEnd=document.id('dateEnd');
$$('li.clickable').each(function(el){
if(!el.hasClass('booked')){
el.addEvent('mousedown',function(){
dateStart.set('value',this.id);
}).setStyle('cursor','pointer');
el.addEvent('mouseup',function(){
dateEnd.set('value',this.id);
}).setStyle('cursor','pointer');
};
})
}
// make the dates clickable
function activate_dates(){
var dateStart=document.id('dateStart');
var dateEnd=document.id('dateEnd');
var click= 'one';
var arrival='';
$$('li.clickable').each(function(el){
if(!el.hasClass('booked') ){
el.addEvent('mousedown',function(){
if ( click =='one'){
dateStart.set('value',this.id);
click = 'two';
arrival = this.id;
} else if ( click =='two') {
if (this.id > arrival) {
dateEnd.set('value',this.id);
click = 'three';
} else {
dateEnd.set();
}
}else{
dateStart.set('value','');
dateEnd.set('value','');
click = 'one';
}
}).setStyle('cursor','pointer');
};
})
}
var dateStart=document.id('dateStart');
var dateEnd=document.id('dateEnd');
var dateStart=$(parent.document.body).getElement('dateStart');
var dateEnd=$(parent.document.body).getElement('dateEnd');
The only hiccup is that if you change the months via the arrows it will reset the click count![]()
var dateStart=$(parent.document.body).getElementById('dateStart');
var dateEnd=$(parent.document.body).getElementById('dateEnd');
Users browsing this forum: Bing [Bot] and 2 guests