Recommend this page to a friend! |
Classes of fathurrahman | mnTemplate | public/asset/vendor/datepicker/README.md | Download |
|
DownloadThis fork was created for inline version of datepicker and currently merged into upstream https://github.com/eternicode/bootstrap-datepicker.Please use original repo for pull requests, thanks! HomeThis is a fork of Stefan Petre's original code; thanks go to him for getting this thing started! Please note that this fork is not used on Stefan's page at this time, nor is it maintained or contributed to by him (yet?) ExampleAttached to a field with the format specified via options:
Attached to a field with the format specified via data tag:
As component:
Attached to non-field element, using events to work with the date values.
As inline datepicker:
Using bootstrap-datepicker.jsCall the datepicker via javascript:
DependenciesRequires bootstrap's dropdown component ( A standalone .css file (including necessary dropdown styles and alternative, text-based arrows) can be generated by running
OptionsAll options that take a "Date" can handle a formatString. Default: 'mm/dd/yyyy' The date format, combination of d, dd, D, DD, m, mm, M, MM, yy, yyyy.
weekStartInteger. Default: 0 Day of the week start. 0 (Sunday) to 6 (Saturday) startDateDate. Default: Beginning of time The earliest date that may be selected; all earlier dates will be disabled. endDateDate. Default: End of time The latest date that may be selected; all later dates will be disabled. daysOfWeekDisabledString, Array. Default: '', [] Days of the week that should be disabled. Values are 0 (Sunday) to 6 (Saturday). Multiple values should be comma-separated. Example: disable weekends: autocloseBoolean. Default: false Whether or not to close the datepicker immediately when a date is selected. startViewNumber, String. Default: 0, 'month' The view that the datepicker should show when it is opened. Accepts values of 0 or 'month' for month view (the default), 1 or 'year' for the 12-month overview, and 2 or 'decade' for the 10-year overview. Useful for date-of-birth datepickers. todayBtnBoolean, "linked". Default: false If true or "linked", displays a "Today" button at the bottom of the datepicker to select the current date. If true, the "Today" button will only move the current date into view; if "linked", the current date will also be selected. todayHighlightBoolean. Default: false If true, highlights the current date. keyboardNavigationBoolean. Default: true Whether or not to allow date navigation by arrow keys. languageString. Default: 'en' The two-letter code of the language to use for month and day names. These will also be used as the input's value (and subsequently sent to the server in the case of form submissions). If an unknown language code is given, English will be used. See I18N below. forceParseBoolean. Default: true Whether or not to force parsing of the input value when the picker is closed. That is, when an invalid date is left in the input field by the user, the picker will forcibly parse that value, and set the input's value to the new, valid date, conforming to the given MarkupFormat a component.
Methods.datepicker(options)Initializes an datepicker. removeArguments: None Remove the datepicker. Removes attached events, internal attached objects, and added HTML elements.
showArguments: None Show the datepicker.
hideArguments: None Hide the datepicker.
updateArguments: None Update the datepicker with the current input value.
setStartDateArguments:
Sets a new lower date limit on the datepicker.
Omit startDate (or provide an otherwise falsey value) to unset the limit.
setEndDateArguments:
Sets a new upper date limit on the datepicker.
Omit endDate (or provide an otherwise falsey value) to unset the limit.
setDaysOfWeekDisabledArguments:
Sets the days of week that should be disabled.
Omit daysOfWeekDisabled (or provide an otherwise falsey value) to unset the disabled days.
EventsDatepicker class exposes a few events for manipulating the dates. showFired when the date picker is displayed. hideFired when the date picker is hidden. changeDateFired when the date is changed.
changeYearFired when the view year is changed from decade view. changeMonthFired when the view month is changed from year view. Keyboard supportThe datepicker includes some keyboard navigation: up, down, left, right arrow keysBy themselves, left/right will move backward/forward one day, up/down will move back/forward one week. With the shift key, up/left will move backward one month, down/right will move forward one month. With the ctrl key, up/left will move backward one year, down/right will move forward oone year. Shift+ctrl behaves the same as ctrl -- that is, it does not change both month and year simultaneously, only the year. escapeThe escape key can be used to hide and re-show the datepicker; this is necessary if the user wants to manually edit the value. enterWhen the picker is visible, enter will simply hide it. When the picker is not visible, enter will have normal effects -- submitting the current form, etc. I18NThe plugin supports i18n for the month and weekday names and the
Right-to-left languages may also include If your browser (or those of your users) is displaying characters wrong, chances are the browser is loading the javascript file with a non-unicode encoding. Simply add
|