Year Picker For Text Input jQuery Plugin | yearpicker.js

YearPicker.js is a lightweight, configurable year picker for jQuery that makes it easy to select a year from a popup similar to the date picker.

jquery ui year picker, jquery datepicker with month and year selection, month and year picker in html, javascript year picker, year picker flutter, only year picker in html

Modern Calendar And Datepicker Module for Vue.js

How to make use of it:

1. Add jQuery library along with the yearpicker.css and yearpicker.js to the web page.

<link rel="stylesheet" href="yearpicker.css">
<script src="/path/to/cdn/jquery.slim.min.js"></script>
<script src="yearpicker.js" async></script>

2. Add the category ‘yearpicker’ to the textual content area.

<input type="text" class="yearpicker" value="">

3. Apply the plugin to the year picker input and accomplished.


4. All default choices to customize the year picker.


  // Initial Year
  year: null,

  // Start Year
  startYear: null,

  // End Year
  endYear: null,

  // Element tag
  itemTag: 'li',

  // Default CSS classes
  selectedClass: 'selected',
  disabledClass: 'disabled',
  hideClass: 'hide',

  // Custom template
  template: `<div class="yearpicker-container">
              <div class="yearpicker-header">
                  <div class="yearpicker-prev" data-view="yearpicker-prev">&lsaquo;</div>
                  <div class="yearpicker-current" data-view="yearpicker-current">SelectedYear</div>
                  <div class="yearpicker-next" data-view="yearpicker-next">&rsaquo;</div>
              <div class="yearpicker-body">
                  <ul class="yearpicker-year" data-view="years">

5. Event handlers.


  onShow: null,
  onHide: null,
  onChange: function(value){}

Basic Year Picker For Text Input, YearPicker Plugin/Github, jquery datepicker-year only

See Demo And Download

Official Website(saravanajd): Click Here

This superior jQuery/javascript plugin is developed by saravanajd. For extra Advanced Usages, please go to the official website.

Related Posts


Confetti Falling Animation Effect In JavaScript | party.js

Party.js is a JavaScript library to brighten user site experience with visual effects! Celebrate success with dom confetti! The library is written in TypeScript and compiled into…


Simple jQuery Cookie Consent Plugin

jquery.cookie-consent is a simple jQuery plugin to request consent to use cookies. An easy-to-use and highly customizable cookie consent bar that informs your visitors of the use…


Timepicker JavaScript Plugin for jQuery Inspired by Google Calendar

jquery.timepicker is a lightweight jQuery timer plugin inspired by Google Calendar. It supports both mouse and keyboard navigation and weighs 5.5KB minified and compact. Features: Highly customizable…


A Lightweight, Touchable, and Responsive Angular Universal Carousel Library

ngxCarousel is a lightweight, tactile, and responsive library for creating an angular carousel. No dependencies, no more hammer. Must Read: Angular Responsive Image Slider With Lightbox Popup…


Generate a Random Number Picker In Vanilla JavaScript

Random Number Picker is a Vanilla JS-based number picker that allows you to generate a random number within a specified range. Must Read: Generating Lottery Numbers Using…


Nepali Date Picker jQuery Plugin | nepaliDatePicker

Nepali Date Picker is a customizable, easy-to-use, and input-based date picker plugin mostly based on the Nepali calendar. Users can choose a Nepali date in the navigable…