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

TimePicker displays forgets a "0" when displaying a time with two "0" inside (time is "11:00" -> "11:0" is displayed)

Hello there, this is the code we're using:

@(Html.EJ().TimePicker("TimePicker").Locale("it-IT").TimeFormat("HH:mm"))

I also tried it without timeformat, this way:

@(Html.EJ().TimePicker("TimePicker").Locale("it-IT"))

The problem occurs with time values which contains two "0" (zero) characters, like 11:00, 5:00, and so on:

when the view which contains the TimePicker is loaded, and the correct time is passed to the timepicker (through javascript), the TimePicker seems to forget about a 0, so that instead of displaying "11:00" -> "11:0" gets displayed.
Later, if you manually select the time from the TimePicker, it displays correctly, till the next time you invoke the View which holds the TimePicker.

Is there maybe a problem in my syntax above or what?

5 Replies

SS Saranya Sivakumar Syncfusion Team July 27, 2015 10:21 AM UTC

Hi Carlo,

Thanks for using Syncfusion products.

We have analyzed the reported issue (Timepicker displays “11:0” instead of “11:00” even if we set TimeFormat) with our sample and unable to reproduce the issue in our end. For your convenience we have prepared the sample based on your requirement and the same can be downloaded from the following location.

http://www.syncfusion.com/uploads/user/forum/119712/ze/TimepickerFormat2291086443562

Could you please check with the above sample? If still you face the problem then please revert us by modifying the sample along with the replication procedure. If possible please share us the screenshot or video clip of the issue and also issue reproducing sample. This will be helpful for us to serve you better.

Please let us know if you have any other queries.

Regards,

Saranya.S



CA Carlo July 27, 2015 01:15 PM UTC

Thanks. The problem was caused by a wrongly formatted string which I was passing to the TimePicker component, so it was my fault, I should have updated this topic so that you wouldn't have to waste your time on this. On the other hand, this other problem, which I explained in this topic:

https://www.syncfusion.com/forums/aspnetmvc/datepicker/119713

is still bugging me and I can't find a way out. May you please give a look into it? Thanks.


SS Saranya Sivakumar Syncfusion Team July 28, 2015 11:37 AM UTC

Hi Carlo,

Thanks for your update.

In order to ensure site.css affects our control please share us the list of the Syncfusion components which you are using in your application. We will check and ensure the details. We can overwrite the css of the component using an API called “CssClass”. We have to specify a class name for “CssClass” property as shown in the following code snippet.

<code>

@(Html.EJ().DatePicker("DatePicker").CssClass("vista"))

</code>

After setting CssClass, we have to apply styles to the class in the style section as shown below.

<code>

.vista a:hover, .vista a:active {

        padding-left: 0px;

        padding-right: 0px;

    }

</code>

We can customize the style according to our need. We have prepared the sample based on your requirement and the same can be downloaded from the following location.

http://www.syncfusion.com/downloads/support/forum/119713/testDatePicker-182443818.zip

Please let us know if you have further queries.

Regards,

Saranya.S



CA Carlo July 29, 2015 06:53 AM UTC

Hi there. Thanks a lot for putting all this effort in helping me out. Currently I'm using the following components:

  • Grid
  • DatePicker
  • DateTimePicker
  • TimePicker
  • CheckBox ( with which I'm having problems setting / getting values, as I explain here: https://www.syncfusion.com/forums/119749/set-and-get-checkbox-value-programmatically-with-jquery)
  • DropDownList
  • RadioButton
  • Button

I may add that in the future, when the application which I'm developing will be more mature, I intend to add a couple of Gantt's and some sort of navigation menu but, for the time being, I only need the aforemented ones to be working.


SS Saranya Sivakumar Syncfusion Team July 30, 2015 06:53 AM UTC

Hi Carlo,

Thanks for your update.

We have checked the reported controls (Checkbox,Datepicker,DateTimepicker,Timepicker,Dropdownlist,Radiobutton, Button) against site.css file and it is working fine except the DatePicker and DateTimePicker control as you have reported in the query. As we have said in the previous update we can overcome this by overwriting the style section of DatePicker and DateTimePicker control using the API called “CssClass”.

We have also analyzed the Grid control with referring site.css and found that there is no issue will occur in Grid control while using Site.css file in your application.
For your reference we have created a sample with enabled major features like editing, scrolling, filtering and etc… and the same can be downloaded from the following link.
Sample Link:
SampleDemo

Please let us know if you have any other queries.

Regards,

Saranya.S


Loader.
Live Chat Icon For mobile
Up arrow icon