Skip to content

HSDatePicker: not recalculating position when it opens (goes off-screen)Β #713

@lenart

Description

@lenart

Summary

When the calendar is placed on the right side, it opens partially off-screen.

Steps to Reproduce

The calendar does not re-calculate position (using Floating UI) when it is open. I've had issues hooking into any of the onInit or onShow callbacks.

<div class="flex justify-end">
  <div class="w-64">
    <!-- Datepicker -->
    <input class="hs-datepicker py-3 px-4" type="text" placeholder="Select day" readonly=""
    data-hs-datepicker='{
      "type": "multiple",
      "selectionDatesMode": "multiple-ranged",
      "displayMonthsCount": 2,
      "mode": "custom-select"
    }'>
  <!-- End Datepicker -->
  </div>
</div>

Image

Demo Link

http://localhost

Expected Behavior

No response

Actual Behavior

No response

Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions