Fullcalendar set Date Range Picker Values

I’m trying to set a date range picker’s start and end dates when i click on a day cell in fullcalendar. It works fine if I’m using a normal date field but when I try to use the date range picker I get an error

Formatter setValue doesn’t exist for type string

dateClick: function(info) {
start=moment(info.date).format(‘Y-MM-DD HH:mm:ss’);

//Works
dmx.parse(‘modal_tripbits.frm_tripbits.start.setValue("’ + start + ‘")’);

//Doesn’t Work
dmx.parse(‘modal_tripbits.frm_tripbits.daterange.start.setValue("’ + start + ‘")’);
dmx.parse(‘modal_tripbits.frm_tripbits.daterange.end.setValue("’ + start + ‘")’);
},

Any pointers would be most appreciated.

Edit.
I’m also trying to update the dates when an event is dropped. If anyone knows what syntax I would use for that I would appreciate it. I’ve tried daterange_ and daterange. for both but neither work.

eventDrop: function(info) {
  //Get the dates in the right format
  start=moment(info.event.start).format('Y-MM-DD HH:mm:ss'); 
  end=moment(info.event.end).format('Y-MM-DD HH:mm:ss'); 
  var id = info.event.extendedProps.tripbit_id;
  //run the sc to update
  dmx.parse('sc_crud_tripbits.load({tripbit_id:' + id + ', daterange_start: "' + start + '", daterange_end: "' + end + '"})');
  if (!confirm("Are you sure about this change?")) {
    info.revert();
  }
}
Community Page
Last updated: