I currently have the following code:
let start_date = '';
var now = new Date();
let validation_date = '';
const $topleft = $(this.refs.topleft);
const message_popup = result.map(item => {
if (moment(item.start).format(Config.DateFormat) == moment(now).format(Config.DateFormat))
{
start_date = moment(item.start).format(Config.DateTimeFormat);
validation_date = new Date(moment(start_date).get('year'), moment(start_date).get('month'), moment(start_date).get('date'), moment(start_date).get('hour'), moment(start_date).get('minute'), moment(start_date).get('second'), moment(start_date).get('millisecond')) - now;
if (validation_date < 0) {
//validation_date += 86400000;
validation_date += 72000000;
}
setTimeout(function ()
{
bootbox.alert({
message: '${ILocale.MsgAlertaEventoP1} ${item.title}${ILocale.MsgAlertaEventoP2} ${moment(item.start).format(Config.TimeFormatAmPm)}',
className: 'bb-alternate-modal'
});
}, validation_date);
}
});
What you want to do is, deploy an alert 10 minutes before the requested time of the BD, some idea of how to do it ... ???