Our pure JavaScript Scheduler component


Post by softwareanswers »

here is my code. I am just trying to call an few events by finding them in the store/schedule board and then update them.

recordsToUpdate.forEach(function(reservationRecord) {
    
var reservation = this.Scheduler.eventStore.find(record => record .reservationId == reservationRecord.ReservationID); reservation.data.startDate = bryntum.scheduler.DateHelper.format( reservationRecord.ArrivalDateJSON, 'DD-MMM-YY h:mm a'); reservation.data.endDate = bryntum.scheduler.DateHelper.format( reservationRecord.DepartureDateJSON, 'DD-MMM-YY h:mm a'); reservation.data.name = "bobs your uncle"; });

please let me know what I am missing.


Post by mats »

Never use the 'data' object, it's private.

reservation.startDate = bryntum.scheduler.DateHelper.format(
    reservationRecord.ArrivalDateJSON, 'DD-MMM-YY h:mm a');
reservation.endDate = bryntum.scheduler.DateHelper.format(
    reservationRecord.DepartureDateJSON, 'DD-MMM-YY h:mm a');
reservation.name = "bobs your uncle";

Post Reply