Skip to content

How do I transalte the time picker? #1832

Discussion options

You must be logged in to vote

Hi! When importing the tw-elements to your js, your app is using the built ES or UMD file, not the files from src folder. Thats why it won't change anything if you try to edit the Default variable.

You can change the default options via data attributes or with JS if you are initializing via JS, for example:

    <div class="relative" 
      data-te-timepicker-init 
      data-te-input-wrapper-init
      data-te-cancel-label="Cancel 2"
      data-te-clear-label="Clear 2"
      data-te-ok-label="Ok 2"
      data-te-invalid-label="Invalid 2"
      >
      <input
        type="text"
        class="peer block min-h-[auto] w-full rounded border-0 bg-transparent px-3 py-[0.32rem] leading-[1.6] ou…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by filipkappa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants