Customizable jQuery Date & Time Picker For Foundation Framework

File Size: 691 KB
Views Total: 20130
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
Customizable jQuery Date & Time Picker For Foundation Framework

A robust jQuery plugin used to create highly customizable date / time / month pickers for Foundation front-end framework.

How to use it:

1. Include jQuery library and the jQuery Foundation Datepicker plugin's files into your Foundation project.

<link href="css/foundation-datepicker.css" rel="stylesheet">
<script src="//"></script>
<script src="js/foundation-datepicker.js"></script>

2. Create a basic date picker attaching to an input field.

<input type="text"  value="11-17-2015" id="demo-1">

3. Create a time picker attaching to an input field.

<input type="text"  value="11-17-2015" id="demo-1">

4. Create a month picker and specify the options via data-* attributes.

<div id="demo-3" 
     <input type="text" value="02/2012" readonly>  

5. Available options.

  // the date format, combination of d, dd, m, mm, yy, yyyy, hh, ii.
  format: 'mm/dd/yyyy',  

  // language
  language: 'en',  

  // day of the week start. 
  // 0 for Sunday - 6 for Saturday
  weekStart: 0,

  // set the start view mode. 
  // Accepts: 'decade' = 4, 'year' = 3, 'month' = 2, 'day' = 1, 'hour' = 0
  startView: 'month',

  // set a limit for view mode. 
  // Accepts: 'decade' = 4, 'year' = 3, 'month' = 2, 'day' = 1, 'hour' = 0
  minView: 'month',
  maxView: 'month', 

  // enables hour and minute selection views, 
  // equivalent of minView = 0, else minView = 2   
  pickTime: false,

  // sets initial date.
  initialDate: null,

  // disables all dates before given date
  startDate: null,

  // disables all dates after given date
  endDate: null,

  // with input fields, allows to navigate the datepicker with arrows. 
  // However, it disables navigation inside the input itself, too
  keyboardNavigation: true,

  // disables all dates matching the given days of week 
  // (0 = Sunday, 6 = Saturday)
  daysOfWeekDisabled: [],

  //  disables the specified dates
  datesDisabled: [],

  // non military tume
  nonMilitaryTime: false


6. API methods.

// Show the datepicker.

// hide the datepicker.

// Update the date picker's position relative to the element

// Update the date picker's value. 
// It can be a string in the specified format or a Date object.
$('#selector').fdatepicker(('update', value)

7. Events.

// fires when the date picker is displayed
$('#selector').fdatepicker().on('show',function () {
  // do something

// fires when the date picker is hidden
$('#selector').fdatepicker().on('hide',function () {
  // do something

// fired when the date is changed
$('#selector').fdatepicker().on('changeDate',function () {
  // do something

// fired when user tries to select disabled date
$('#selector').fdatepicker().on('outOfRange',function () {
  // do something



  • added nonMilitary Time option


  • Add missing values for fr


  • Allow the user to clear input and trigger and event with the change.


  • Added english language file


  • Changed Spanish dates to lowercase


  • Added the function "changeViewDate" that could be called from outside to update the date and the view date, this could be usefull when you wanna update the user date highlighted but you don't wanna trigger the ChangeValue of the date.


  • Fixed Focus input field when datepicker is open should not close the datepicker


  • bugs fixed.


  • fix broken autoShow option


  • Fixed currentDate because if we are using the DateTimePicker with Hours and Minutes currentDate it's not correct because with valueOf() get the total value with minutes and hours and after compare that value with prevMonth.valueOf() that is different.
  • add disable css classes to month and year view, removed trailing whitespaces, updated example.html to repesent 'startDate' and 'endDate' options


  • add initial date option
  • fix(RTL): Fix the arrows class.


  • add support for the year calendar selecting


This awesome jQuery plugin is developed by najlepsiwebdesigner/. For more Advanced Usages, please check the demo page or visit the official website.