<input type="text" data-beatpicker="true"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['right','bottom']">
<input type="text" data-beatpicker="true" data-beatpicker-position="['right','*']">
<input type="text" data-beatpicker="true" data-beatpicker-position="['right','top']">
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']">
<input type="text" data-beatpicker="true" data-beatpicker-position="[10,50]">
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-format="['YYYY','MM','DD']"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-format="['YYYY','MM','DD'],separator:'/'" />
<input type="text" data-beatpicker="true" data-beatpicker-position="['right','*']" data-beatpicker-format="['DD','MM','YYYY'],separator:'/'"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from:[2014,1,1],to:[2014,3,1]}"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from:[2014,1,1],to:'>'}"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from:[2014,1,1],to:'<'}"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from:[2014,1,1],to:[2014 , 2 , '*']}"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from:[2014,1,1],to:['*' , '2' , '*']}"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from:[2014,1,1],to:['*' , '2' , '2']}"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from:[2014,1,6],to:['2014' , '*' , '*']}"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from:'*',to:['*' , '2' , '*']}"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from:'*',to:['*' , '*' , 2]}"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from:'*',to:['*' , 2 , 2]}"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from:[2014 , 2 , 2],to:[2014 , 3 , 7]},{from:[2014 , 5 , 3],to:[2014 , 7 , 4]}"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from:'*',to:'*'}"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-range="true">
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-disable="{from :[2014,3,16] , to:[2014,4,8]}" data-beatpicker-range="true,true">
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-module="gotoDate"/>
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-module="today,clear" />
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-module="header,footer" />
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-module="icon" />
<input type="text" data-beatpicker="true" data-beatpicker-extra="customOptions"/>
Javascript:
customOptions = {
view : {
alwaysVisible:true
},
labels: {
today: "Tod",
gotoDateInput: "Insert your date",
gotoDateButton: "Set",
clearButton: "Wipe"
}
}
<input type="text" data-beatpicker="true" data-beatpicker-id="myPicker"/>
Buttons markup
<button class="show-picker">Show</button>
<button class="hide-picker">hide</button>
Buttons markup
$('.show-picker').click(function(e){
e.stopPropagation();
myPicker.show();
});
$('.hide-picker').click(function(e){
e.stopPropagation();
myPicker.hide();
})
<input type="text" data-beatpicker="true" data-beatpicker-position="['*','*']" data-beatpicker-id="myDatePicker"/>
status box markup
<div class="status-box"></div>
status box javascript
$(document).ready(function(){
var statusGenerator = function (text) {
var statusElem = $(".status");
var child = $("<span></span>").text(text);
statusElem.append(child);
};
myDatePicker.on("select", function (data) {
statusGenerator(data.string + " selected")
});
myDatePicker.on("change", function (data) {
statusGenerator("Date picker changed current date: "+data.string);
});
myDatePicker.on("show", function () {
statusGenerator("Date picker show")
});
myDatePicker.on("clear", function (data) {
statusGenerator("Date picker cleared. cleared date: " + data.string)
});
myDatePicker.on("hide", function () {
statusGenerator("Date picker hide")
});
})