Mobiscroll Instance
When a mobiscroll component is initialized, an instance of the component is created. Through the instance you have access to all methods and properties of the component.
There are multiple ways to access the instance of an individual component.
1. Inside events
The mobiscroll instance is passed as parameter for every event of the component.
mobiscroll.date('#mydate', {
onSet: function (event, inst) {
var selectedDate = inst.getVal(); // Call the getVal method
}
})
2. Initialization
The instance is also returned by the component's initialization:
var inst = mobiscroll.date('#mydate');
inst.show(); // Call the show method
3. Through active instance
Stores the currently active mobiscroll instance (expcept inline instances), or null if there is no active instance.
mobiscroll.activeInstance