4

I have downloaded and tried the jQuery DatetimePicker control from http://plugins.jquery.com/datetimepicker/. This is v2.3.7.

And in the download there is an image attached here which shows the selectors on both hours and minutes. But I haven't been able to find anything in the documentation on how to achieve that. Could someone please point out how to achieve this?

 $('#' + subgridid_complete).datetimepicker({
                   format: 'mm/dd/yy H:i',//'d.m.Y H:i',
                   //inline: true
                   mask:true,
               });

This is what I get using the code above. Notice that the Hour and minute are not independently selectable.

enter image description here

Many thanks

enter image description here

A.K
  • 505
  • 1
  • 12
  • 30
  • Can you show us your the JavaScript/HTML code where you use that DateTimePicker? Which Theme did you use? – Thargor Sep 09 '15 at 11:44
  • This page (documentation): http://xdsoft.net/jqplugins/datetimepicker/ only initialize the object and it works. – Marcos Pérez Gude Sep 09 '15 at 11:44
  • 1
    You must to share your code if this is not the problem, we haven't got a crystal ball – Marcos Pérez Gude Sep 09 '15 at 11:45
  • @Thargor Please check the updated question. The theme should be the default theme I have not changed it. – A.K Sep 09 '15 at 11:59
  • 1
    I remember. I tried that before, too. No example on the page shows a freely choosable time. I switched to the http://trentrichardson.com/examples/timepicker/ (a jquery-ui-addon). Here, the Time can free choosen, like in that example: http://trentrichardson.com/examples/timepicker/ – Thargor Sep 09 '15 at 12:12
  • Yes @Thargor, this control works just fine. Could you post it as answer so I can accept it ? – A.K Sep 09 '15 at 12:55

5 Answers5

10

No example on the page shows a freely choosable time. You can use 'step' to specify for example a 15 minute step in the time scroll-bar.

You can also switch to the trentrichardson.com/examples/timepicker (a jquery-ui-addon). Here, the Time can be chosen, like in that example: trentrichardson.com/examples/timepicker

A.K
  • 505
  • 1
  • 12
  • 30
5

If you want 15 minute intervals try:

step: 15, 
GhostCat
  • 137,827
  • 25
  • 176
  • 248
Abin Abraham
  • 91
  • 1
  • 6
2

From the documentation >> For time only

jQuery('#datetimepicker5').datetimepicker({
 datepicker:false,
 allowTimes:[
 '12:00', '13:00', '15:00', 
  '17:00', '17:05', '17:20', '19:00', '20:00'
 ]
});

For datepicker with date and time use:

   jQuery('#datetimepicker4').datetimepicker({
   format:'d.m.Y H:i'         
   });

datetimepicker4 and datetimepicker5 are textbox id on which you want to open calendar

Nishith Kant Chaturvedi
  • 4,719
  • 2
  • 16
  • 24
0

Have you seen this? http://xdsoft.net/jqplugins/datetimepicker/

This contains few examples on how to use the datetimepicker, and also use moment.js with this.

0

I tried that before, too. No example on the documenation page shows a freely choosable time.

So I switched to jquerUI-timepicker. Here, the Time can be freely chosen. Many examples are provided.

Thargor
  • 1,862
  • 14
  • 24