Coder Social home page Coder Social logo

mahdidoraj / angular-bootstrap-persian-datepicker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aminrahimi/angular-bootstrap-persian-datepicker

0.0 1.0 0.0 578 KB

A clean, flexible, and fully customizable persian date picker

Home Page: http://aminrahimi.github.io/angular-bootstrap-persian-datepicker/

JavaScript 100.00%

angular-bootstrap-persian-datepicker's Introduction

Angular Bootstrap Persian Datepicker

تقویم شمسی انگولار!

A clean, flexible, and fully customizable persian date picker.

User can navigate through months and years. The datepicker shows dates that come from other than the main month being displayed. These other dates are also selectable.

Everything is formatted using the persian date filter and thus is also localized.

Demo

Datepicker Settings

All settings can be provided as attributes in the persian-datepicker or globally configured through the datepickerConfig.

  • ng-model : The date object.

  • datepicker-mode (Defaults: 'day') : Current mode of the datepicker (day|month|year). Can be used to initialize datepicker to specific mode.

  • min-date (Default: null) : Defines the minimum available date.

  • max-date (Default: null) : Defines the maximum available date.

  • date-disabled (date, mode) (Default: null) : An optional expression to disable visible options based on passing date and current mode (day|month|year).

  • show-weeks (Defaults: true) : Whether to display week numbers.

  • starting-day (Defaults: 6) : Starting day of the week from 0-6 (0=Sunday, ..., 6=Saturday).

  • init-date : The initial date view when no model value is not specified.

  • min-mode (Defaults: 'day') : Set a lower limit for mode.

  • max-mode (Defaults: 'year') : Set an upper limit for mode.

  • format-day (Default: 'dd') : Format of day in month.

  • format-month (Default: 'MMMM') : Format of month in year.

  • format-year (Default: 'yyyy') : Format of year in year range.

  • format-day-header (Default: 'EEE') : Format of day in week header.

  • format-day-title (Default: 'MMMM yyyy') : Format of title when selecting day.

  • format-month-title (Default: 'yyyy') : Format of title when selecting month.

  • year-range (Default: 20) : Number of years displayed in year selection.

Popup Settings

Options for datepicker can be passed as JSON using the datepicker-options attribute. Specific settings for the datepicker-popup-persian, that can globally configured through the datepickerPopupConfig, are:

  • datepicker-popup-persian (Default: 'yyyy-MM-dd') : The format for displayed dates.

  • show-button-bar (Default: true) : Whether to display a button bar underneath the datepicker.

  • current-text (Default: 'Today') : The text to display for the current day button.

  • clear-text (Default: 'Clear') : The text to display for the clear button.

  • close-text (Default: 'Done') : The text to display for the close button.

  • close-on-date-selection (Default: true) : Whether to close calendar when a date is chosen.

  • datepicker-append-to-body (Default: false): Append the datepicker popup element to body, rather than inserting after datepicker-popup. For global configuration, use datepickerPopupConfig.appendToBody.

Keyboard Support

Depending on datepicker's current mode, the date may reffer either to day, month or year. Accordingly, the term view reffers either to a month, year or year range.

  • Left: Move focus to the previous date. Will move to the last date of the previous view, if the current date is the first date of a view.
  • Right: Move focus to the next date. Will move to the first date of the following view, if the current date is the last date of a view.
  • Up: Move focus to the same column of the previous row. Will wrap to the appropriate row in the previous view.
  • Down: Move focus to the same column of the following row. Will wrap to the appropriate row in the following view.
  • PgUp: Move focus to the same date of the previous view. If that date does not exist, focus is placed on the last date of the month.
  • PgDn: Move focus to the same date of the following view. If that date does not exist, focus is placed on the last date of the month.
  • Home: Move to the first date of the view.
  • End: Move to the last date of the view.
  • Enter/Space: Select date.
  • Ctrl+Up: Move to an upper mode.
  • Ctrl+Down: Move to a lower mode.
  • Esc: Will close popup, and move focus to the input.

angular-bootstrap-persian-datepicker's People

Contributors

aminrahimi avatar phpniki avatar rafialikhan avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.