We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Localization and customization

Hello,
I want to perform some customization in the mobile time picker and I would like to know if they are possible :
1. Chance the text from "Set Time" to my custom text (in Hebrew)
2. display the time format in 24 format , whcich means that the AM/PM selection is not relevant and should not be presented
3. Can the seconds selection can be customized so the seconds will be shown in 5 seconds diff (e.g. 0 ,5, 10,15...)

Thx
Sagi

1 Reply

DR Dhinesh Ravi Syncfusion Team January 6, 2016 09:06 AM UTC

Hi Sagi,

Thank you for contacting Syncfusion Support.

Please find the response for the queries as in below.

Query1: Change the text from “Set Time” to my custom text.

In Android(both mobile and tablet) and Windows(Tablet only), dialog control is utilized to display time picking options. Hence, Dialog will be rendered with the id of timepicker followed by “_dialog”. Then we can customize the title of the Dialog in focusin event of TimePicker control. Refer to the following code example.

[html]

<input id="timepicker" data-role="ejmtimepicker" data-ej-focusin="focus" />

    <script>

        function focus(args) {

            // For android(both tablet and mobile) and windows(Tablet only)

            if (ej.isAndroid() || (ej.isWindows && !ej.isLowerResolution()))

                //Changes the text of the dialog

                $("#timepicker_dialog").ejmDialog({ title: "customText" })

            // For windows Mobile

            if (ej.isWindows() && ej.isLowerResolution())

                //Changes the text of the flip page

                $(".e-m-tp-header").html("customText")

        }
    </script>


For windows mobile, time picking options will be available in flip page. The “Set Time” text is available within the div element of class “.e-m-tp-header”, which can be customized using the respective class selector as mentioned in above code example.

The workaround provided will be moved to Timepicker source and available in our Essential Studion 2015, volume 4 release, which is expected to roll out by next week.

Query2: Display the time format in 24 format, which mean AM/PM selection is not relevant and should not be presented.

We can customize the time format of Mobile TimePicker using the property “hourformat”. Refer to the following code example.

[html]

<!--displays the time format in 24hour excluding AM/PM-->
<input id="timepicker" data-role="ejmtimepicker" data-ej-hourformat="twentyfour" data-ej-focusin="focus" />

<!--displays the time format in 12hour with AM/PM-->

<input id="Text1" data-role="ejmtimepicker" data-ej-hourformat="twelve" data-ej-focusin="focus" />


Query3: Can the seconds selection can be customized so the seconds will be shown in 5 seconds diff.

Currently we don’t have support for customizing seconds for TimePicker in our product. Hence, we consider that “seconds support for Mobile TimePicker ” as a feature request and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.


https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents 


We have also created the simple sample for first 2 queries. Refer to the sample in the following link

http://jsplayground.syncfusion.com/plrx4014
 
Regards,
Dhinesh R


Loader.
Up arrow icon