Drag-and-Drop Task Presets
Usage
theme: 'ios' You can turn auto theming on and let it decide based on the platform.
Usage
themeVariant: 'light' You can turn auto dark mode on based on system settings.
Usage
clickToCreate: true,
// click to create is on dragToCreate: true,
// drag to create is on dragToMove: true,
// reordering is on dragToResize: true,
// resizing is on eventDelete: true
// deleting is on Fine-tune drag & drop with these options, which are false by default.
Usage
locale: mobiscroll.localeEn Selecting the locale loads the localized settings and the translated UI text.
Drag-and-Drop Task Presets
Use external draggable events to create preset tasks that people can quickly copy and spawn events from. A great example is a car wrapping shop where different jobs need to be set up depending on the type of vehicle.
Print a list of predefined tasks and initialize them as draggable elements. Enable externalDrop for the calendar and set up the predefined event skeletons for the draggable component.
Whenever there is more information to be captured, like detailed task notes, customer information, the name of the technician... you can trigger a popup with the task form in the onEventCreate lifecycle event. For failed drops (trying to schedule a task during lunch breaks or weekends) the onEventCreateFailed event will be triggered.
Demo
The live demo didn't load.
Try it on demo.mobiscroll.com
Code
mobiscroll.setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
$(function () {
var tasks = [
{
title: 'Small wrap',
color: '#637e57',
start: '2026-10-29T00:00',
end: '2026-10-30T00:00',
},
{
title: 'Full-size wrap',
color: '#50789d',
start: '2026-10-29T00:00',
end: '2026-10-31T00:00',
},
{
title: 'Mid-size wrap',
color: '#6c5d45',
start: '2026-10-29T00:00',
end: '2026-10-31T00:00',
},
{
title: 'Roadster wrap',
color: '#9da721',
start: '2026-10-29T00:00',
end: '2026-10-31T00:00',
},
{
title: 'SUV wrap',
color: '#cd6957',
start: '2026-10-29T00:00',
end: '2026-11-01T00:00',
},
{
title: 'Hypercar wrap',
color: '#7a5886',
start: '2026-10-29T00:00',
end: '2026-11-02T00:00',
},
];
var $title = $('#external-event-job');
var $details = $('#external-event-details');
function fillDialog(args) {
$title.mobiscroll('getInst').value = args.event.title;
$details.mobiscroll('getInst').value = args.event.details || '';
technician.setVal();
dialog.setOptions({ anchor: args.target });
dialog.open();
}
$('#external-event-calendar')
.mobiscroll()
.eventcalendar({
view: {
calendar: { labels: true },
},
invalid: [
{
recurring: {
repeat: 'weekly',
weekDays: 'SA,SU',
},
},
],
dragToMove: true,
externalDrop: true,
onEventCreated: function (args) {
fillDialog(args);
},
onEventCreateFailed: function () {
mobiscroll.toast({
message: "Can't create event on this date",
});
},
onEventUpdateFailed: function () {
mobiscroll.toast({
message: "Can't add event on this date",
});
},
});
var technician = $('#external-event-select')
.mobiscroll()
.select({
inputElement: document.getElementById('external-event-select-input'),
display: 'anchored',
touchUi: false,
})
.mobiscroll('getInst');
var dialog = $('#external-event-dialog')
.mobiscroll()
.popup({
display: 'anchored',
width: 400,
contentPadding: false,
touchUi: false,
headerText: 'Assign task',
buttons: ['ok'],
onClose: function () {
mobiscroll.toast({
message: 'New task added',
});
},
})
.mobiscroll('getInst');
$('.external-event-task').each(function (i, task) {
$(task).mobiscroll().draggable({ dragData: tasks[i] });
});
});
<div class="mbsc-grid mbsc-no-padding">
<div class="mbsc-row">
<div class="mbsc-col-sm-9 external-event-calendar">
<div id="external-event-calendar"></div>
</div>
<div class="mbsc-col-sm-3">
<div class="mbsc-form-group-title">Available tasks</div>
<div class="external-event-task" style="background: #637e57;">
<div>Small wrap</div>
<div>2 days</div>
</div>
<div class="external-event-task" style="background: #50789d;">
<div>Full-size wrap</div>
<div>3 days</div>
</div>
<div class="external-event-task" style="background: #6c5d45;">
<div>Mid-size wrap</div>
<div>3 days</div>
</div>
<div class="external-event-task" style="background: #9da721;">
<div>Roadster wrap</div>
<div>3 days</div>
</div>
<div class="external-event-task" style="background: #cd6957;">
<div>SUV wrap</div>
<div>4 days</div>
</div>
<div class="external-event-task" style="background: #7a5886;">
<div>Hypercar wrap</div>
<div>5 days</div>
</div>
</div>
</div>
</div>
<div id="external-event-dialog">
<div class="mbsc-form-group">
<label for="external-event-job">
<input id="external-event-job" mbsc-input data-label="Task" readonly></input>
</label>
<label for="external-event-details">
<textarea id="external-event-details" mbsc-textarea data-label="Details" placeholder="Add description..."></textarea>
</label>
<label>
Technician
<input mbsc-input id="external-event-select-input" placeholder="Please select..." data-dropdown="true" />
</label>
<select id="external-event-select">
<option value="1">Roly Chester</option>
<option value="2">Tucker Wayne</option>
<option value="3">Baker Brielle</option>
<option value="4">Jami Walter</option>
<option value="5">Patrick Toby</option>
<option value="6">Tranter Logan</option>
<option value="7">Payton Sinclair</option>
</select>
</div>
</div>
.external-event-calendar {
border-right: 1px solid #ccc;
}
.external-event-task {
color: #fff;
padding: 10px;
margin: 20px;
border-radius: 8px;
font-family: -apple-system, Segoe UI, Roboto, sans-serif;
}
.demo-external-event-presets.demo-wrapper,
.demo-external-event-presets .mbsc-grid,
.demo-external-event-presets .mbsc-row,
.demo-external-event-presets .external-event-calendar {
height: 100%;
}