anypicker
Version:
AnyPicker is a customizable jQuery Picker Library for Mobile OS. Create custom mobile pickers (Date, Time, Rating etc) for iOS, Android & Windows. Use pre-built pickers like Date Picker, Time Picker, Date Time Picker, etc
325 lines (212 loc) • 5.83 kB
HTML
<html>
<head>
<title>Basic Picker and DatePicker - AnyPicker</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="msapplication-tap-highlight" content="no" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
body
{
margin: 0px;
}
.input-cont
{
width: 300px;
padding: 20px;
}
input
{
width: 200px;
height: 30px;
padding: 3px 10px;
margin-bottom: 16px;
}
.ap-ex-row
{
text-align: center;
padding: 10px 0px 10px 0px;
}
.ap-ex-row_icon
{
float: left;
margin-left: 150px;
width: 30px;
height: 30px;
}
.ap-ex-row_label
{
float: left;
margin-left: 20px;
height: 40px;
line-height: 30px;
}
</style>
<link rel="stylesheet" type="text/css" href="../src/anypicker-font.css" />
<link rel="stylesheet" type="text/css" href="../src/anypicker.css" />
<link rel="stylesheet" type="text/css" href="../src/anypicker-ios.css" />
<link rel="stylesheet" type="text/css" href="../src/anypicker-android.css" />
<link rel="stylesheet" type="text/css" href="../src/anypicker-windows.css" />
<script type="text/javascript" src="vendors/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="../src/anypicker.js"></script>
<script type="text/javascript" src="Currencies.js"></script>
<script type="text/javascript">
var sArrCurrency = [];
function getCurrencyList()
{
for(var iTempIndex = 0; iTempIndex < currencies.length; iTempIndex++)
{
var oCurrency = currencies[iTempIndex];
sArrCurrency.push(
{
val: oCurrency["code"],
label: oCurrency["symbol_native"] + " - " + oCurrency["code"]
});
}
}
var io18n = {
headerTitle: "Select Currency"
},
oArrComponents = [
{
component: 0,
name: "currency",
label: "Currency"
}
],
oArrDataSource = [
{
component: 0,
data: sArrCurrency
}
];
$(document).ready(function()
{
getCurrencyList();
$("#ip-de-1").AnyPicker(
{
mode: "select",
i18n: io18n,
components: oArrComponents,
dataSource: oArrDataSource
});
$("#ip-ios-1").AnyPicker(
{
mode: "select",
i18n: io18n,
components: oArrComponents,
dataSource: oArrDataSource,
theme: "iOS" // "Default", "iOS", "Android", "Windows"
});
$("#ip-android-1").AnyPicker(
{
mode: "select",
i18n: io18n,
components: oArrComponents,
dataSource: oArrDataSource,
theme: "Android" // "Default", "iOS", "Android", "Windows"
});
$("#ip-wp-1").AnyPicker(
{
mode: "select",
i18n: io18n,
components: oArrComponents,
dataSource: oArrDataSource,
theme: "Windows", // "Default", "iOS", "Android", "Windows"
componentsCoverFullWidth: true
});
$("#ip-de-2").AnyPicker(
{
mode: "datetime",
dateTimeFormat: "MMMM d, yyyy"
});
$("#ip-ios-2").AnyPicker(
{
mode: "datetime",
dateTimeFormat: "MMMM d, yyyy",
theme: "iOS" // "Default", "iOS", "Android", "Windows"
});
$("#ip-android-2").AnyPicker(
{
mode: "datetime",
dateTimeFormat: "MMM dd, yyyy",
theme: "Android" // "Default", "iOS", "Android", "Windows"
});
$("#ip-wp-2").AnyPicker(
{
mode: "datetime",
dateTimeFormat: "MMM dd, yyyy",
theme: "Windows" // "Default", "iOS", "Android", "Windows"
});
});
</script>
</head>
<body>
<table class="input-cont">
<tr>
<td>Currency : (Default)</td>
</tr>
<tr>
<td>
<input type="text" id="ip-de-1" value="₹ - INR" readonly />
</td>
</tr>
<tr>
<td>Currency : (iOS)</td>
</tr>
<tr>
<td>
<input type="text" id="ip-ios-1" value="₹ - INR" readonly />
</td>
</tr>
<tr>
<td>Currency : (Android)</td>
</tr>
<tr>
<td>
<input type="text" id="ip-android-1" value="₹ - INR" readonly />
</td>
</tr>
<tr>
<td>Currency : (Windows)</td>
</tr>
<tr>
<td>
<input type="text" id="ip-wp-1" value="₹ - INR" readonly />
</td>
</tr>
<tr>
<td>Date : (Default) </td>
</tr>
<tr>
<td>
<input type="text" id="ip-de-2" readonly>
</td>
</tr>
<tr>
<td>Date : (iOS) </td>
</tr>
<tr>
<td>
<input type="text" id="ip-ios-2" readonly>
</td>
</tr>
<tr>
<td>Date : (Android) </td>
</tr>
<tr>
<td>
<input type="text" id="ip-android-2" readonly>
</td>
</tr>
<tr>
<td>Date : (Windows) </td>
</tr>
<tr>
<td>
<input type="text" id="ip-wp-2" readonly>
</td>
</tr>
</table>
</body>
</html>