Closed badikgit closed 2 months ago
The problem is that you're setting dir=rtl after the plugin is initialised. It needs to be set before initialisation for it to work correctly. See the Right to Left example page on the demo site for a working example.
@jackocnr Thank you. It became a little clearer how to use it. In this regard, the question arises: is there a way to change the localization settings and the direction of writing after initialisation of the input without destroying the instance?
For example, I have a simple html page with support for changing the page language to different languages without reloading the page, and this page can have many fields for entering a phone number. I would like to be able to change dir
and i18n
depending on the selected language while preserving the numbers in each instance of the input, since the user may want to change the language at any time, for example, after entering the number or part of it. And at the moment it turns out that the only possible way to do this is to save the entered number (or what the user entered, for example +1-888-library) for each instance before destroying the instance, and then create a new instance and fill it with the saved information?
is there a way to change the localization settings and the direction of writing after initialisation of the input without destroying the instance?
I'm afraid this is not possible, no. As you say, you'll need to destroy the instance and re-initialise to achieve this.
Plugin version
e.g. v24.5.0 (please try latest version)
Steps to reproduce
Expected behaviour
The list of countries should not be visually shifted.
Actual behaviour
The list of countries is visually shifted to the left. This can be a problem for the visibility of the list contents if, for example, the field is located on the left side of the screen.
Initialisation options
I don't know