General
Getting Started
Quick Install
Using with Cordova
Using with Ionic
Using with ES Modules
Mobiscroll CLI
Working with the Source
Instance
Customizing the Look and Feel
Upgrade From Trial
Utility functions
Update version
Upgrade Guide v5
Date & Time pickers
Event Calendar
Form components
Pickers & dropdowns
Page layout
Tools
Accessibility
This version of the documentation is outdated. Check the latest version here!
Utils
A collection of general purpose utility functions which can be used independently from Mobiscroll component instances.
1. Platform
import { platform } from '@mobiscroll/angular';
Description
Information about the current platform.
| Name | Type | Description |
|---|---|---|
| name | String |
Possible values:
|
| majorVersion | Number | The major version of the platform |
| minorVersion | Number | The minor version of the platform |
2. Format Date
import { formatDate } from '@mobiscroll/angular';
Description
Format a date into a string value with a specified format.
Example
formatDate('yy-mm-dd', new Date(2015, 1, 19));
// Produces '2015-02-19'
Parameters
3. Parse Date
import { parseDate } from '@mobiscroll/angular';
Description
Extract a date from a string value with a specified format.
Example
parseDate('yy-mm-dd', '2015-02-19')); // returns date object