FormDate::setParam

menentukan settingan pada tanggal yang akan ditampilkan

setParam($params = array());

  • $params: Array konfigurasi yang bisa anda setting dalam input field tanggal ini
    • autoclose: Boolean. Default: false
      • Whether or not to close the datepicker immediately when a date is selected #autoclose
    • before-show-day: Function(Date). Default: $.noop
      • A function that takes a date as a parameter #beforeshowday
    • calendar-weeks: Boolean. Default: false
      • Whether or not to show week numbers to the left of week rows #calendarWeeks
    • clear-btn: Boolean. Default: false
      • If true, displays a “Clear” button at the bottom of the datepicker to clear the input value. If “autoclose” is also set to true, this button will also close the datepicker. #clearBtn
    • days-of-week-disabled: String, Array. Default: ‘’, []
      • Days of the week that should be disabled. Values are 0 (Sunday) to 6 (Saturday). Multiple values should be comma-separated #daysOfWeekDisabled
    • end-date: Date. Default: End of time
      • The latest date that may be selected; all later dates will be disabled.
    • force-parse: Boolean. 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 format.
    • format': String. Default: “mm/dd/yyyy”
      • The date format, combination of d, dd, D, DD, m, mm, M, MM, yy, yyyy.
    • keyboard-navigation: Boolean. Default: true
      • Whether or not to allow date navigation by arrow keys.
    • language': String. Default: “en”
      • The IETF code (eg “en” for English, “pt-BR” for Brazilian Portuguese) 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 a full code (eg “de-DE”) is supplied the picker will first check for an “de-DE” language and if not found will fallback and check for a “de” language.
    • min-view-mode: Number, String. Default: 0, “days”
      • Set a limit for the view mode. Accepts: “days” or 0, “months” or 1, and “years” or 2. Gives the ability to pick only a month or an year. The day is set to the 1st for “months”, and the month is set to January for “years”.
    • multidate': Boolean, Number. Default: false
      • Enable multidate picking. Each date in month view acts as a toggle button, keeping track of which dates the user has selected in order. If a number is given, the picker will limit how many dates can be selected to that number, dropping the oldest dates from the list when the number is exceeded. true equates to no limit. The input’s value (if present) is set to a string generated by joining the dates, formatted, with multidateSeparator
    • multidateSeparator': String. Default: ”,”
      • The string that will appear between dates when generating the input’s value. When parsing the input’s value for a multidate picker, this will also be used to split the incoming string to separate multiple formatted dates; as such, it is highly recommended that you not use a string that could be a substring of a formatted date (eg, using ‘-‘ to separate dates when your format is ‘yyyy-mm-dd’).
    • orientation': String. Default: “auto”
      • A space-separated string consisting of one or two of “left” or “right”, “top” or “bottom”, and “auto” (may be omitted); for example, “top left”, “bottom” (horizontal orientation will default to “auto”), “right” (vertical orientation will default to “auto”), “auto top”. Allows for fixed placement of the picker popup.
    • start-date: Date. Default: Beginning of time
      • The earliest date that may be selected; all earlier dates will be disabled.
    • start-view: Number, 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.
    • today-btn: Boolean, “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.
    • today-highlight: Boolean. Default: false
      • If true, highlights the current date.
    • week-start: Integer. Default: 0
      • Day of the week start. 0 (Sunday) to 6 (Saturday)
Jika method ini tidak digunakan maka secara default akan menggunakan settingan seperti di bawah

formDate

->setParam(array(
	'autoclose'       => true,
	'format'          => 'yyyy-mm-dd',
	'start-view'      => 0,
	'today-btn'       => true,
	'today-highlight' => true
	));

FormDatetime

->setParam(array(
	'autoclose'       => true,
	'format'          => 'yyyy-mm-dd hh:ii:ss',
	'start-view'      => 0,
	'today-btn'       => true,
	'today-highlight' => true
	));

 

File Path: includes/lib/pea/form/FormDate.php membuat input field untuk pilihan tanggal

0 Comment

Post Your Comment

Terakhir Dilihat

Method Tersedia