External Date Navigation

This example demonstrates how can the Timeline navigated externally. Here we have a two-pane layout with a Datepicker on the left and a Timeline on the right. Changing date on the Datepicker will trigger the date change on the Timeline.

The Datepicker calls the navigate method of the Timeline in its onChange event, while the Timeline sets the datepicker value with the setVal method from its onSelectedDateChange event.

Download and try example

Demo

Loading the live demo

Preview in full screen

Use a two-panel Timeline navigated by an external date picker — selecting a date syncs the timeline and the picker instantly.

Code

mobiscroll.setOptions({
  locale:  ,
  theme: ' ',
  themeVariant: ' '
});

var monthInst = mobiscroll.datepicker('#demo-month', {
  display: 'inline',
  onChange: function (args) {
    dayInst.navigate(args.value);
  },
});

var dayInst = mobiscroll.eventcalendar('#demo-day', {
  view: {
    timeline: { type: 'day' },
  },
  resources: [
    { id: 1, name: 'Resource 1', color: 'red' },
    { id: 2, name: 'Resource 2', color: 'orange' },
    { id: 3, name: 'Resource 3', color: 'blue' },
  ],
  onSelectedDateChange: function (args) {
    monthInst.setVal(args.date);
  },
});

mobiscroll.getJson(
  'https://trial.mobiscroll.com/filter-resource-events/',
  function (events) {
    dayInst.setEvents(events);
  },
  'jsonp',
);
  

Duplicate Session

You have signed in on a different machine. To keep everything in sync, you have been signed out of this session.

If you need to invite team members, manage seats and accounts you can do it from the licenses page.

Duplicate Session

We noticed you are logged in on a different machine and have closed your old session.

If you need to invite team members, manage seats and accounts you can do it from the licenses page.