Tribune

Home » Alloy UI » English

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
RathnaDevi Chellaiah
How to get the no. of days between startdate and end date in aui calendar?
28 aprile 2012 5.53
Risposta

RathnaDevi Chellaiah

Punteggio: Junior Member

Messaggi: 29

Data di Iscrizione: 26 marzo 2012

Messaggi recenti

Hi guys,
I am using aui calendar of liferay to display start date and end date.. i want to find the no of days between start and end date.. Does any one know how get the days between in aui calendar.. my calendar function is :


AUI().use('aui-datepicker', function(A) {
var simpleDatepicker1 = new A.DatePicker({
trigger : '#FromToDate',
calendar : {
dateFormat : '%d/%m/%y',
allowNone : false,
showToday : true,
setValue : true,
minDate : '01/01/1900',
maxDate : '01/01/2100',
selectMultipleDates : false
}
}).render();
});
Hitoshi Ozawa
RE: How to get the no. of days between startdate and end date in aui calend
28 aprile 2012 7.03
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

Can't you just get values from your start date and end date and just calculate differences in your javascript function?

var startdate = new Date(startyear, startmonth - 1, startday);
var enddate = new Date(endyear, endmonth - 1, endday);
var diff = startdate - enddate;
var numberOfDays = diff / 86400000;
RathnaDevi Chellaiah
RE: How to get the no. of days between startdate and end date in aui calend
3 maggio 2012 1.23
Risposta

RathnaDevi Chellaiah

Punteggio: Junior Member

Messaggi: 29

Data di Iscrizione: 26 marzo 2012

Messaggi recenti

Hi Hitoshi Ozawa,
Thanks for replying. it worked fine...
Hitoshi Ozawa
RE: How to get the no. of days between startdate and end date in aui calend
3 maggio 2012 1.28
Risposta

Hitoshi Ozawa

Punteggio: Liferay Legend

Messaggi: 7949

Data di Iscrizione: 23 marzo 2010

Messaggi recenti

Good. I wasn't too sure that was what you wanted. emoticon