edgeLabelPlacement bug if local is rtl instead of rtl

i want the first and last label inside the silder,
i fixed it with 

edgeLabelPlacement: EdgeLabelPlacement.inside,

but when i change my local language to ar "arabic"

it become outside the slider

Image_7704_1733147626489

i want it to be like the ltr one without changing the whole direction of the slider

Image_6551_1733147688369


1 Reply

HK Hariharasudhan Kanagaraj Syncfusion Team December 5, 2024 03:24 PM UTC

Hi Ammar,

 

To display the labels within the bounds of the SfSlider for both English and Arabic localizations, you can set the labelPlacement property to the LabelPlacement.betweenTicks.

 

 

 

Additionally, if you need to display the labels within the bounds of the SfSlider and render the SfSlider in a single direction, you can wrap the SfSlider widget with the Directionality widget and explicitly set the textDirection property to TextDirection.ltr, as shown in the code snippet below.

 

Directionality(

  textDirection: TextDirection.ltr,

  child: SfSlider(

    min: DateTime(2024, 01),

    max: DateTime(2025, 01),

    value: _value,

    edgeLabelPlacement: EdgeLabelPlacement.inside,

    dateFormat: DateFormat('MMMM', _selectedLocale.languageCode),

    onChanged: (dynamic newValue) {

      setState(() {

        _value = newValue;

      });

    },

  ),

),

 

If you have further queries, feel free to reach us!.

 

Regards,

Hari Hara Sudhan. K.


Attachment: 195366_f0b63a86.zip

Loader.
Up arrow icon