Methods

Methods are called on a t-datepicker by calling the tDatepicker function with a string first parameter, followed by any parameters the method takes

<script type="text/javascript">
  $(document).ready(function(){
    $(".t-datepicker").tDatePicker('method_name', 'parameter')
  })
</script>

show

Type: String

Default: none

Show the picker. You can show all table theme or only table theme follow class | id name.
<script type="text/javascript">
  $('.t-datepicker').tDatePicker('show') // show all
  $('.class_name').tDatePicker('show')   // show only follow class | id name
</script>

hide

Type: String

Default: none

Hide the picker. You can hide all table theme or only table theme follow class | id name.
<script type="text/javascript">
  $('.t-datepicker').tDatePicker('hide') // hide all
  $('.class_name').tDatePicker('hide')   // hide only follow class | id name
</script>

update

Type: String | Date | Array, optional

Default: none

Update the datepicker with given arguments or the current input value. The arguments can be either an array of strings, an array of Date objects, multiples strings or multiples Date objects. If date arguments are provided and they are Date objects, it is assumed to be “local” Date objects, and will be converted to UTC for internal use.
Note: You have make sure date syntax format yyyy-mm-dd. If you don't like it. You can custom with formatDate

Or, you want use new Date(), Be carefull with number of months, it is start 0 -> 11 <=> Jan -> Dec

<script type="text/javascript">
  $('.t-datepicker').tDatePicker('update', '2018-07-17')
  $('.t-datepicker').tDatePicker('update', new Date(2018,06,17))
  $('.t-datepicker').tDatePicker('update', ['2018-07-17', '2018-07-18'])
  $('.t-datepicker').tDatePicker('update', [new Date(2018,06,17), new Date(2018,06,17)])
</script>
To reset the datepicker and clear the selected date, pass an empty string with update
<script type="text/javascript">
  $('.t-datepicker').tDatePicker('update', '')
</script>
Detail Update >>

updateCI

Type: String | Date

Default: none

You have make sure date syntax format yyyy-mm-dd. If you get date into input value, you can change format with setFormatValueInput: 'yyyy-mm-dd'

Or, you want use new Date(), becarefull with number of months. Tt is start 0 -> 11 <=> Jan -> Dec

<script type="text/javascript">
  $('.t-datepicker').tDatePicker('updateCI', '2018-07-17')
  $('.t-datepicker').tDatePicker('updateCI', new Date(2018,06,17))
</script>
To reset the updateCI and clear the selected date, pass an empty string with updateCI
<script type="text/javascript">
  $('.t-datepicker').tDatePicker('updateCI', '')
</script>
Detail UpdateCI >>

updateCO

Type: String | Date

Default: none

The same updateCI. But, if you don't setup setDateCheckIn or check-in value='null'. tDatePicker will be set default date of check-in for setLimitDays

No support only Picker View Demo

<script type="text/javascript">
  $('.t-datepicker').tDatePicker('updateCO', '2018-07-17')
  $('.t-datepicker').tDatePicker('updateCO', new Date(2018,05,20))
</script>
To reset the updateCO and clear the selected date, pass an empty string with updateCO
<script type="text/javascript">
  $('.t-datepicker').tDatePicker('updateCO', '')
</script>
Detail UpdateCO >>

setStartDate

Type: String | Date

Default: none

Sets a new lower date limit on the datepicker. See startDate for valid values.
Omit startDate (or provide an otherwise falsey value) to unset the limit.

<script type="text/javascript">
  $(document).ready(function(){
    $(".t-datepicker").tDatePicker('setStartDate', '2018-07-17')
  })
</script>

setEndDate

Type: String | Date

Default: none

Sets a new lower date limit on the datepicker. See endDate for valid values.
Omit endDate (or provide an otherwise falsey value) to unset the limit.

<script type="text/javascript">
  $(document).ready(function(){
    $(".t-datepicker").tDatePicker('setEndDate', '2018-12-30')
  })
</script>

getDate

Type: String

Default: none

Returns a localized date object representing the internal date object of the first datepicker in the selection. For multidate pickers, returns the latest date selected.

<script type="text/javascript">
  $(document).ready(function(){
    var getDate = $('.t-datepicker').tDatePicker('getDate')
    // Return Date Object
    // e.g: Wed Jul 18 2018 07:00:00 GMT+0700
  })
</script>

getDates

Type: String

Default: none

Returns a list of localized date objects representing the internal date objects of the first datepicker in the selection. For use with multidate pickers.

<script type="text/javascript">
  $(document).ready(function(){
    var getDates = $('.t-datepicker').tDatePicker('getDates')
    // Return [Date Object, Date Object]
  })
</script>

getDateInput

Type: String

Default: none

Returns a localized date string representing the internal date objects of the input check-in. For use with multidate pickers. Date type follow formatDate

<script type="text/javascript">
  $(document).ready(function(){
    var getDateInput = $('.t-datepicker').tDatePicker('getDateInput')
    // Return Date String
    // e.g: '2018-07-17'
  })
</script>

getDateInputs

Type: String

Default: none

Returns a list localized date string representing the internal date objects of the input check-in and check-out. For use with multidate pickers. Date type follow formatDate

<script type="text/javascript">
  $(document).ready(function(){
    var getDateInput = $('.t-datepicker').tDatePicker('getDateInput')
    // Return [Date String, Date String]
    // e.g: Return ['2018-07-17', '2018-07-18']
  })
</script>

getDateUTC

Type: String

Default: none

Returns the internal UTC date number, as-is and unconverted to local time, of the first datepicker in the selection. For multidate pickers, returns the latest date selected.

<script type="text/javascript">
  $(document).ready(function(){
    var getDateUTC = $('.t-datepicker').tDatePicker('getDateUTC')
    // Return UTC Date Number
    // e.g: Return 1531785600000
  })
</script>

getDateUTCs

Type: String

Default: none

Returns the internal list of UTC date number, as they are and unconverted to local time, of the first datepicker in the selection and of the last datepicker in selection. For use with multidate pickers.

<script type="text/javascript">
  $(document).ready(function(){
    var getDateUTCs = $('.t-datepicker').tDatePicker('getDateUTCs')
    // Return [UTC CI, UTC CO]
    // e.g: Return [1531785600000, 1531872000000]
  })
</script>

getStartDate

Type: String

Default: none

Returns the lower date limit on the datepicker.

<script type="text/javascript">
  $(document).ready(function(){
    var getStartDate = $('.t-datepicker').tDatePicker('getStartDate')
    // Return Date Object
    // e.g: Wed Jul 18 2018 07:00:00 GMT+0700
  })
</script>

getStartDateUTC

Type: String

Default: none

Returns the lower UTC date limit on the datepicker.

<script type="text/javascript">
  $(document).ready(function(){
    var getStartDateUTC = $('.t-datepicker').tDatePicker('getStartDateUTC')
    // Return Date Number
    // e.g: 1531785600000
  })
</script>

getEndDate

Type: String

Default: none

Returns the upper date limit on the datepicker.

<script type="text/javascript">
  $(document).ready(function(){
    var getEndDate = $('.t-datepicker').tDatePicker('getEndDate')
    // Return Date Object
    // e.g: Wed Jul 18 2018 07:00:00 GMT+0700
  })
</script>

getEndDateUTC

Type: String

Default: none

Returns the upper UTC date limit on the datepicker.

<script type="text/javascript">
  $(document).ready(function(){
    var getDateUTC = $('.t-datepicker').tDatePicker('getDateUTC')
    // Return Date Number
    // e.g: 1531785600000
  })
</script>