Basic Usage
Dependency
Plugin Files To Include
Initialization Code for AnyPicker (with Default settings)
Initialization Code for AnyPicker DateTime Mode
Initialization Code for AnyPicker Select Mode
This is a quick quide which will help you to start using AnyPicker.
- jQuery
Javascript
- anypicker.min.js (required)
CSS
- anypicker-all.min.css (required, combines all files listed below)
OR
- anypicker.min.css (required)
- anypicker-ios.css (optional, for iOS
theme) - anypicker-android.css (optional, for Android
theme) - anypicker-windows.css (optional, for Windows
theme) - anypicker-font.css (optional, Windows
themeand ButtonrowsNavigationicon font)
Font
You have to include fonts folder in distribution file. Fonts folder contains -
- anypicker-font (Font Icon - Up & Down Buttons and Set, Cancel, Now & Clear Buttons in Windows theme)
HTML
<input type="text" id="input-1" readonly>
Javascript
$("#input-1").AnyPicker({});
HTML
<input type="text" id="input-1" readonly>
Javascript
$("#input-1").AnyPicker(
{
mode: "datetime",
dateTimeFormat: "MMM dd, yyyy"
});
HTML
<input type="text" id="input-1" readonly>
Javascript
$("#input-1").AnyPicker(
{
mode: "select",
components: [
{
component: 0,
name: "currency",
label: "Currency"
}],
dataSource: [
{
component: 0,
data: [
{
val: "USD",
label: "$ - USD"
},
{
val: "EUR",
label: "€ - EUR"
},
{
val: "INR",
label: "₹ - INR"
},
{
val: "ILS",
label: "₪ - ILS"
},
{
val: "JPY",
label: "¥ - JPY"
}]
}]
});
Parameter Options List
This is a list of the plugin settings parameters. This list includes parameters, their default values, all possible values that you can set and describes how to use parameters.
Callback Functions List
This is a list of callback functions that are triggered on reaching the specified condition.
Build with Grunt
QuickStart
Preconfigured Tasks
- Install node from http://nodejs.org.
- Run
npm installin the AnyPicker's root directory to install grunt's dependencies. - Run
grunt, which will run the default task, which runsconcat,copy,uglifyandcssmin.
-
grunt- This is a Default Task.It is configured as an array of tasks.
-
concat- Default concat task, which concatenates all .js files to create anypicker.js -
copy- copies all .js and .css files from /src folder to /dist folder. -
uglify- minifies javascript code -
cssmin- concatenates /src/anypicker.css to /dist/CalenStyle.min.css and minifies css.
-
-
grunt AnyPickerJSConcat- This command helps to build a /src/anypicker-custom.js by combining .js files for specified views. After concatenation,copy,uglifyandcssmintasks will be performed.For example -This command will build a custom script by combining code for Select and DateTime.grunt AnyPickerJSConcat:Select:DateTime
A list of valid arguments for this commandSelectDateTime