Lewati ke konten

Date Picker - JS + CSS

Date Picker

banner-background

<div class="ina-date-picker">
  <button
    type="button"
    class="ina-date-picker__trigger ina-date-picker__trigger--size-md"
  >
    <svg class="ina-date-picker__trigger-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
      <rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
      <line x1="16" y1="2" x2="16" y2="6"></line>
      <line x1="8" y1="2" x2="8" y2="6"></line>
      <line x1="3" y1="10" x2="21" y2="10"></line>
    </svg>
    <span class="ina-date-picker__trigger-text">Pilih Tanggal</span>
  </button>
  <div class="ina-date-picker__panel">
    <div class="ina-date-picker__panel-content">
      <!-- Calendar content -->
    </div>
  </div>
</div>

Single Date

Nilai yang dipilih: -

Date Range

Nilai yang dipilih: -

Multiple Dates

Nilai yang dipilih: -
<div class="ina-time-picker" data-format="HH:mm" data-allow-clear="true">
  <div class="ina-time-picker__wrapper">
    <input
      type="text"
      class="ina-time-picker__input"
      placeholder="Select time"
    />
    <div class="ina-time-picker__suffix-icon">
      <svg
        xmlns="http://www.w3.org/2000/svg"
        width="16"
        height="16"
        viewBox="0 0 24 24"
        fill="none"
        stroke="currentColor"
        stroke-width="2"
        stroke-linecap="round"
        stroke-linejoin="round"
        class="icon icon-tabler icons-tabler-outline icon-tabler-clock"
      >
        <path stroke="none" d="M0 0h24v24H0z" fill="none" />
        <path d="M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0" />
        <path d="M12 7v5l3 3" />
      </svg>
    </div>
  </div>
</div>

<script>
  window.InaUI.initTimepicker();
</script>

Basic Usage

Nilai yang dipilih: -

12 Hours Format

Nilai yang dipilih: -

With Seconds

Nilai yang dipilih: -