List including all options from built-in plugins. All options that take a “Date” can handle a Date object, or a String formatted according to the given formatDate
<script type="text/javascript"> $(document).ready(function(){ $(".t-datepicker").tDatePicker({ autoClose: true, // more options here ... }) }) </script>
Type: Boolean
Default: true
... autoClose: true, ...
Type: Number
Default: 200
... durationArrowTop: 200, ...
Type: Boolean
Default: false
... valiDation: false, ...
You can use custom demo script
HTML5 validation to prevent form submit when the date field(s) haven't been populated. You set valiDation: true.
... valiDation: true, ...
Type: String
Default: yyyy-mm-dd
... formatDate: 'yyyy-mm-dd', ...
Type: String | Date | (yyyy/mm/dd)
Default: null
This dateCheckIn specifies date selected on calendar theme default. If you do not setup dateCheckIn, t-datepicker will use date startDate is default. You have to compare dateCheckIn with startDate.
Be carefull, when using date Object, in javascript number of months go from 0 to 11.
... dateCheckIn: '2018-07-17', // or dateCheckIn: new Date(2018,06,17) ...
Type: String | Date | (yyyy/mm/dd)
Default: null
This dateCheckOut specifies date selected calendar on theme default. If you do not setup dateCheckOut, t-datepicker will use last date of limitNextMonth is default. You have to compare dateCheckOut with limitNextMonth
Be carefull, when using date Object, in javascript number of months go from 0 to 11.
No support only Picker View Demo
... dateCheckOut: '2018-07-17', // or dateCheckOut: new Date(2018,06,18) ...
Type: String | Date | (yyyy/mm/dd)
Default: null
The earliest date that may be selected. All earlier dates will be disabled. If startDate none value, t-datepicker will using date toDay make default.
If you have set Date dateCheckIn, when you clicked picker calendar, t-datepicker will show date follow dateCheckIn
... startDate: '2018-07-15', // or startDate: new Date(2018,06,15) ...
Type: String | Date | (yyyy/mm/dd)
Default: null
The last date that may be selected, all later dates will be disabled. If endDate none value, t-datepicker auto setEndDate follow numCalendar + limitNextMonth
... endDate: '2018-12-30', // or endDate: new Date(2018,06,15) ...
Type: Number
Default: 0
... limitPrevMonth: 0, ...
Type: Number
Default: 11
... limitPrevMonth: 11, ...
Type: Number
Default: 31
This limitDateRanges specifies number limit date you can selected. Define is dates from CI to CO for you to choose. All earliest date of CI and later date of CO will disabled.
The limitDateRanges has relationship with update method
...
limitDateRanges : 60, // 60 days or 59 nights
limitNextMonth : 2,
...
Type: Boolean
Default: false
This showFullDateRanges specifies title number nigth or daytime when you hover on date calendar theme follow limitDateRanges.
Default showFullDateRanges is false, title is nigth or nights when date more than 2, limitDateRanges will be - 1 date.
Use showFullDateRanges is true. You can change title is days titleDateRanges, It will follow your language.
...
showFullDateRanges : true,
titleDateRanges : 'days',
// Your custom
startDate : '2018-07-20',
dateCheckIn : '2018-07-25',
dateCheckOut : '2018-08-24',
...
Type: Object
Default: null
This fnDataEvent specifies special date on the month (Holidays). This function only suport Destop with action :hover. It bookmarks special day and when you hover date special, It will show title special date follow your data.
<script type="text/javascript"> var holiDays = { '2018-01-01' : 'New Years is Day', '2018-01-02' : 'Lorem ipsum dolor sit amet ...', '2018-02-14' : 'Lorem ipsum dolor sit amet ...', '2019-01-02' : 'Lorem ipsum dolor sit amet ...' }; $(document).ready(function() { $('.t-datepicker').tDatePicker({ fnDataEvent: holiDays, startDate : '2018-12-20', mergeDataEvent : true }) }) </script>
Type: Boolean
Default: false
This mergeDataEvent specifies special date on the month (Holidays). This function only suport Destop with action :hover.
It keeps and replaces special day of the data Holidays. E.g: keep 2018-01-02, replace 2019-01-02
<script type="text/javascript"> var holiDays = { '2018-01-01' : 'New Years is Day', '2018-01-02' : 'Lorem ipsum dolor sit amet ...', '2018-02-14' : 'Valentin is Day', '2019-01-02' : 'Replace 2018-01-02...' }; $(document).ready(function() { $('.t-datepicker').tDatePicker({ fnDataEvent: holiDays, startDate : '2018-12-20', mergeDataEvent : true }) }) </script>
Type: Number
Default: 2
... numCalendar: 2, ...
Type: String
Default: Check In
... titleCheckIn: 'Check In', ...
Type: String
Default: Check Out
...
titleCheckOut: 'Check Out',
...
Type: String
Default: Today
... titleToday: 'Today', ...
Type: String
Default: night
... titleDateRange: 'night', ...
Type: String
Default: nights
... titleDateRanges: 'nights', ...
Type: Array
Default: ['Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa', 'Su']
...
titleDays: ['Mo','Tu','We','Th','Fr','Sa','Su'],
...
Type: Array
Default: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'Septemper', 'October', 'November', "December"]
... titleMonths: ['January','February','March','April','May', 'June','July','August','Septemper','October','November','December'], ...
Type: Number
Default: 3
The titleMonthsLimitShow help you litmit letter show title of months on dates theme.
It is work with your data months titleMonths. If you want show full title of months into titleMonths.
You can setup max length of item your data months array or titleMonthsLimitShow: 99
... titleMonthsLimitShow: 3, ...
Type: String
Default: null
If you don't like data setTitleMonths is type text. You want use number of months, the replaceTitleMonths will help you with value is empty replaceTitleMonths: ' '
Or you have anything good ideas, You can mix text + number replaceTitleMonths: 'Text '
... replaceTitleMonths: '', ...
Type: String
Default: dd-mm-yyyy
... showDateTheme: 'dd-mm-yyyy', ...
Type: Boolean
Default: true
Show or hide iconArrowTop when table calendar show or hide, it will help you saw table calender position in check-in or check-out.
... iconArrowTop: true, ...
Type: String
Default: ➜ | #x279C
Default is dingbats. You can include html with the font icons on the your website. You don't know about font-icon. You can view more fontawesome
... iconDate: '➜', // or iconDate: <i class="fa fa-calendar"></i> // fontawesome ...
Type: String
Default: ❮ | #x276E
You can use text 'Pre' or dingbats. But it is not good. You can include html with the font icons on the your website. You don't know about font-icon. You can view more fontawesome
... arrowPrev: '❮', // or arrowPrev: <i class="fa fa-chevron-left"></i> // fontawesome ...
Type: String
Default: ❯ | #x276F
You can use text 'Next' or dingbats. But it is not good. You can include html with the font icons on the your website. You don't know about font-icon. You can view more fontawesome
... arrowNext: '❯', // or arrowNext: <i class="fa fa-chevron-right"></i> // fontawesome ...
Type: Boolean
Default: true
Hide or show titleDateRange
... dateRangesShowTitle: true, ...
Type: Boolean
Default: true
Off action hover dateRangesShowTitle and limitDateRanges
... dateRangesHover: true, ...
Type: Boolean
Default: false
If true, highlights the current date.
... toDayHighlighted: false, ...
Type: Boolean
Default: false
If false, highlights the next date.
... nextDayHighlighted: false, ...
Type: Array
Default: [0,6]
Days of the week that should be highlighted. Values are 0 (Sunday) to 6 (Saturday). Multiple values should be comma-separated. Example: highlight weekends: [0,6].
... daysOfWeekHighlighted: [0,6], ...
Type: Array
Default: []
Array of date strings with format yyyy-mm-dd.
... dateDisabled: ['2018-12-01'], ...