I use mobiscroll DatePicker for Android, which returns the datetime in this form:
yyyy-mm-ddThh:mm:ssZ.
So, it's different from the form the form the plugin uses ... [For how to upgrade the plugin to work with 2.2 check this Question]
So I tried this solution to alert notifications at specific dates:
if (typeof plugins !== "undefined")
{
var RId = 0;
var rDate =new Date();
var RemDate = reminder_deadline.split("T")[0];
var RemTimeB = reminder_deadline.split("T")[1];
var RemTime = RemTimeB.split("Z")[0];
var RYear = RemDate.split("-")[0];
var RMonth = RemDate.split("-")[1];
var RMonth = RMonth-1;
var RDay = RemDate.split("-")[2];
var RHour = RemTime.split(":")[0];
var RMinute = RemTime.split(":")[1];
var RSecond = RemTime.split(":")[2];
alert(RYear+".."+RMonth+".."+RDay+".."+RHour+".."+RMinute+".."+RSecond);
rDate.setFullYear(RYear);
rDate.setMonth(RMonth);
rDate.setDate(RDay);
rDate.setHours(RHour);
rDate.setMinutes(RMinute);
rDate.setSeconds(RSecond);
plugins.localNotification
.add({
date: rDate,
message: reminder_name,
id: RId
});
}
RId++;
}
Hope it helps :)