Jump to content
php.lv forumi
  • 0

Jquery timepicker nerādīt pagājušos laikus


senters

Question

Izmantoju timepicker pluginu http://trentrichardson.com/examples/timepicker/.

 

 

// Time Picker [JQUERY UI]
$(function() {
$('#timepicker').timepicker({
ampm: false,
hourMin: 0,
hourMax: 23,
showSecond: false,
timeFormat: 'hh:mm',
stepHour: 1,
stepMinute: 5,
duration: 0
})
}); 

 

Lapā tas izskatas šādi - http://screencast.com/t/s1oMWPaLl.

Vajadzīgs ir, lai nevar izvēlēties laiku, kas jau pagājis, bet rāda šī brīža laiku ar soli (stepMinute: 5).

Ja tagad ir 9:58, tad sākuma atļautais datums, ko var izvēlēties ir 10:00.

 

Datepicker'ī ir līdzīgi, lai nerādītu kalendārā pagājušos datumus - http://screencast.com/t/KwIbfUon8 tiek lietots parametrs "minDate: new Date()".

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

Demo no viņu lapas kurā tiek izmantots onSelect events:

 

$('#example15').datetimepicker({
   showSecond: true,
   showMillisec: true,
   timeFormat: 'hh:mm:ss:l',
   onSelect: function(dateText, inst){
       if(window.console)
           console.log(dateText);
   }
});

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...