How to show 24 hour time picker in tempusdominus plugin - tempus-dominus-datetimepicker

I'm using this plugin https://tempusdominus.github.io/bootstrap-4/
to insert a datetimepicker. I would display time picker showing time in 24 hours (i.e not showing 02:00 PM but 14:00).
There a way to perform this, with tempusdominus plugin. I follow the guide, but it still display time with AM and PM.
Thanks.

In your jQuery you should set format from LT to
format:'HH:mm';
If you want the date and time just set
format: 'dddd, MMMM Do YYYY, HH:mm';
You can find all your formats at Formats

I had the same problem and I changed the code to:
$('.datePicker').datetimepicker({
format: 'DD/MM/YYYY, HH:mm',
});
and it works now

Related

How to change format of date in smart-table

i'm using Smart-Table in my mean.js app, and i need change format of date values. For default format is "MMM, dd yyyy" and I want to change it to "dd-MM-yyyy". Anybody can help me?
As mentioned in angular documentation you can change the format of the angular date filter
so your markup cood look like
<td>{{myDateValue | date:'dd-MM-yyyy' }}</td>

How do I format dates in a Telerik RadHtmlChart's Tooltip ClientTemplate?

Using UI for ASP.NET AJAX RadHtmlChart feature, In a Column Chart, I am trying to format a date in a Tooltip's ClientTemplate and I can't seem to figure it out.
On the Y-Axis I have dollar amounts, on the X-Axis I have the 24 hours of the day (12am, 1am, 2am, ... 11pm). The X-Axis labels work fine using the following:
<LabelsAppearance DataFormatString="htt" RotationAngle="0" />
Unfortunately, when I use the following ToolTips template the X-Axis value renders as a long format date like Tue Nov 11 2014 03:00:00 GMT-0600 (Central Standard Time) rather than 3AM:
<TooltipsAppearance BackgroundColor="#ffffff" Color="#5ab7de">
<ClientTemplate>
<div><b>#=category#</b></div>
<div>$#=value#</div>
</ClientTemplate>
</TooltipsAppearance>
How do I get #=category= to format my date like this: 4PM?
Well, the answer was buried in a demo on the Telerik site but here's the code I needed:
#= kendo.format(\'{0:htt}\', category) #

How to display just the month in a date picker control

I want to display just the month in datecontrol, like
datecontrol1 = January, February ... december
I dont want to diplay day, year and time.
How to do this?
If you are talking about DTPicker then you can select it's property Format to 3 - dtpCustom and set the 'CustomFormat' to 'MMMM' like this:
If it's the DTPicker control found in Microsoft Windows Common Controls-2, you can set the Format to 3 - dtpCustom and set the CustomFormat to MMMM.

Hours labelling for RadChart

I'm trying to use Telerik's RadChart (Spline) on WP7 to display the hourly temperature forecast. I'm having a hard time finding information on how to set the horizontal-axis to group by hour. The examples project contains a chart grouped by month, but when I change
DateTimeComponent="Month" LabelFormat="MMM yyyy"
to:
DateTimeComponent="Hour" LabelFormat="hh ddd"
I get a divide-by-zero error when it tries to build the axis.
Here is an example of what I'm trying to achieve:
NOAA Hourly Weather Forecast Graph
Anyone know of a tutorial or what I might be doing wrong?
Thanks
For the LabelFormat can you please try "h tt"? I don't have access to try right now, but that should work. The format would be "3 PM"
What solved it for me was to switch DateTimeCategoricalAxis to a DateTimeContinuousAxis. I found the examples in the Telerik samples app very helpful.
<telerikChart:DateTimeContinuousAxis
LabelFitMode="MultiLine"
LabelFormat="htt"
MajorStep="6"
LabelStyle="{StaticResource PhoneTextSmallStyle}"
MajorStepUnit="Hour"
PlotMode="OnTicks" />

Is there an hour and minute picker for jQuery?

Not a date picker,but should let user pick hour and minute,like 23:15.
Is there such a plugin yet?
My personal favorite is this one:
http://fgelinas.com/code/timepicker/
This works great and is really fast to work with - three clicks to set the time. And it's elegantly written, with code that closely resembles the jQuery UI date-picker approach and style.
It does minutes in 5-minute increments, however - not sure if that's precise enough for your purposes.
I use this one in my last project and it worked like a charm. You can use it with both date and time at the same time or separately.
check 10 jQuery Time Picker plugins: http://www.sitepoint.com/10-jquery-time-picker-plugins/
my favorite is http://tarruda.github.io/bootstrap-datetimepicker/
and this https://fgelinas.com/code/timepicker/
:D

Resources