Giter Club home page Giter Club logo

jquery-timepicker-addon's People

Contributors

althaus avatar aparshin avatar apepper avatar benmurden avatar bistory avatar cadi avatar deonheyns avatar doublerebel avatar emlun avatar gvas avatar harbulot avatar ianare avatar insonifi avatar jhron avatar jun66j5 avatar kapouer avatar kumm avatar michael-simons avatar netforce1 avatar richardbradley avatar rizzicr avatar rossj avatar simonexmachina avatar srvance avatar teast avatar tomaswindsor avatar trentrichardson avatar voda avatar vorapoap avatar zauberfisch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jquery-timepicker-addon's Issues

In AM/PM mode 12 AM is showing up between 11 AM and 12 PM

I'm passing the following options into the datetimepicker:

{
showAnim: 'highlight',
showOn: 'both',
ampm: true,
timeFormat: 'hh:mmTT',
stepMinute: 15,
buttonImage: 'media/famfamfam/silk/date.png',
buttonText: 'click to open date picker'
}

I'm going to take a crack at fixing it myself. I'll let you know the results.

NOTE: I am using the dev version of the code:

  • Version 0.9.2-dev
  • Last Modified: 12/17/2010

It is not working correctly in a picker showing more than one month

If the picker has numberOfMonths greater than 1 the timepicker will show under every month when it should only show under all months once.

This is because of the place the timepicker is being injected. I think this could be solved this way almost at the end of injectTimePicker function:

// $dp.find('.ui-datepicker-calendar').after($tp);  this is current code
// check if the button panel is enable
// if so add the timepicker before it
// otherwise append timepicker at the end of datepicker layer
if (this.defaults.showButtonPanel) {
    $dp.find('.ui-datepicker-buttonpane').before($tp);
}
else {
    $dp.append($tp);
}

I decided to do it that way because, though you decided to override showButtonPanel datepicker defaults, setting it to true in datetimepicker, there is still the posibility to disable it:

$("#foo").datetimepicker({showButtonPanel: false});

It would be nice to document this override default. I think any change to datepicker defaults should be documented to avoid confusion. And would be better if nothing is overriden.

I would look for a way to implement setDateTime and getDateTime without overriden datepicker methods. I totally agree with Trent it is better that way.

Stable version.

It would be nice if some releases can be tagged, so we know what can be used as a stable version.

dashes in input id break addon

Say my input element had an id like: id="input-1"
Every datetimepicker element would get an id like this: id="ui-timepicker-div-input1\-1"

if I change the input id to: id="input_1", it works.

Error when call setDate (dp_inst.lastVal is undefined)

Hi
I get error "dp_inst.lastVal is undefined" on line 552 of jquery-ui-timepicker-addon-0.8.0.js when call setDate method.
I change line "if (dp_inst.lastVal.length > 0 && this.$input.val().length === 0) {" to "if (dp_inst.lastVal != null && dp_inst.lastVal.length > 0 && this.$input.val().length === 0) {" and error disappear.

Original Datepicker field does not close after select

I have two input fields that use a datepicker and this timepicker respectively.
While the timepicker has a Done button that closes the dialog, the original datepicker does not. So it doesn't close automatically after a date selection.

Clearing field using several inputs not working

First of all, great work!!
Just wanted to say that when using several inputs,for instance StartDate and EndDate inputs, clearing the value of EndDate (hitting delete) returns the initial value after unfocus. This happens only when StartDate has been chosen.
If I first clear the time of EndDate, and then go back to EndDate - I can delete it?
Would be great if this worked.

regards
/Max

Passing on vars/options to datepicker

It seems when i use datettimepicker() to instantiate, the vars/options that are available to datepicker() aren't passend on. When using {inline: true} it still gives me the 'done' button.

Using altField and altDate

I am using altField and altDate. But the time doesn't get inserted. Also the time format conflicts with the date format (mm is month in time format and minute in date format).
Is there an alternate way of using an alternate field with the datetimepicker?

_updateDateTime: dp_inst is null

Ubuntu 10.10, Firefox 3.6.12

dp_inst null error

fixed with

var dp_inst = this.inst;
if(this.inst == null){return false;}

Issue not occurring with Firefox 3.6.12 on windows 7 64bit.

Replace 'Today' with 'Now'

If time picker is activated, you should change functionality of 'Today' button in order to set sliders on the time nearest to current.

Display Inline

You can put jQuery UI datepicker inline (directly on the page without "popup") calling datepicker on a div. But wont work with timepicker.

Any solution?

Problem with hour: 23 or minute: 59 or second: 59

Sorry for my english :)

A bad date (actually 12/31/1899 23:59) is set when one or more of these values is set (hour: 23 or minute: 59 or second: 59).

$('#dateheure').datetimepicker({ second:59, minute: 59, hour:23 });

If second < 59 and minute < 59 and hour < 23, the good date is displayed (2010-12-01).

The problem happens when the initial value is "".

I see that the bad datetime is directly displayed in the input when we click on it, at the same time the dialog opens.

When (second < 59 and minute < 59 and hour < 23), the datetime is displayed in the input when we click on the "done" button

Setup problems with timepicker()

I'm having problems getting timepicker() to work with jquery-1.4.2 and jquery-ui-1.8.5 .

When I click on a timepicker element, I get the error "TypeError: Result of expression '$tp.find('#ui_tpicker_hour_' + dp_id).slider' [undefined] is not a function." in the console. It indicates line 309 in jquery-ui-timepicker-addon.js (version 0.8). Line 309 is the last line here:

            tp_inst.hour_slider = $tp.find('#ui_tpicker_hour_' + dp_id).slider({
                orientation: "horizontal",
                value: tp_inst.hour,
                min: opts.hourMin,
                max: hourMax,
                step: opts.stepHour,
                slide: function(event, ui)
                {
                    tp_inst.hour_slider.slider("option", "value", ui.value);
                    tp_inst.onTimeChange(dp_inst, tp_inst);
                }
            });

Below is my test page. Whatever guidance you could give would be most appreciated!

Thanks.

<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
<head>
<title>testpage</title>
        <link type="text/css" href="jq-ui/css/ui-lightness/jquery-ui-1.8.5.custom.css" rel="stylesheet" />  
        <script type="text/javascript" src="jq-ui/js/jquery-1.4.2.min.js"></script>
        <script type="text/javascript" src="jq-ui/js/jquery-ui-1.8.5.custom.min.js"></script>
        <script type="text/javascript" src="timepicker/jquery-ui-timepicker-addon.js"></script>
    <script>
    $(function() {
                $( "#start" ).timepicker();
                $( "#end" ).timepicker();
    });
    </script>
        <style type="text/css">
            /* css for timepicker */
            .ui-timepicker-div .ui-widget-header{ margin-bottom: 8px; }
            .ui-timepicker-div dl{ text-align: left; }
            .ui-timepicker-div dl dt{ height: 25px; }
            .ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; }
            .ui-timepicker-div td { font-size: 90%; }
        </style>    

</head>
<body>

<form>

<div id="tpicker">
  <label for="start" id="startLabel">Start:</label>
  <input type="text" name="start"  size="12" id="start" />
  <label for="end" id="endLabel">End:</label>
  <input type="text" name="end"  size="12" id="end" />
</div> <br>
</form>

</body>
</html>

Allow user to input date & time manually

Hello.

User can't type comas, spaces or colons in text field. But one can type dots, so one can type in the date manually, but does not have an ability to type something like this:

21.10.2011, 20:05

Thanx

getDate does not return Date object

I tried getDate method like this:
var dt = $("#idref").datetimepicker("getDate");

but it looks like a jQuery element is returned, not a Date object,
I suspect the problem lies at line 490:

else return this.each(function() {
    $(this).datepicker(o);
});

Maybe adding another 'if' clause for getDate and calling properly should solve the problem

Clearing field.

There is no possibility for me to clear a datetime field. I erase the date and remove the focus from the field and it puts the value back in.

Maybe a "Reset" or "Clear" button would be a nice-to-have?

12 AM

Found another item. in formatTime(), once hour12 is set, it contains an hour value as a string. Thus, the following (hour12 === 0) check is always false. This needs to be either (Number(hour12) === 0) or (hour12 == 0).

-- NC

Does not respect default value

Hi,
I've spent the whole day trying to get this to work. If my input field has a given day and time (say 1/11/2003 08:15 ) when I click on the field the timepicker just defaults/changes to the current day.

Is this a bug / not supported?

no default dateFormat error while using this addon with localization

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="/javascripts/jquery-ui/timepicker-addon.js"></script>
<script type="text/javascript" src="/javascripts/jquery-ui/datepicker-ru.js"></script>
<script type="text/javascript">
  $(function(){
    $('#order_datetime').datetimepicker({
      stepMinute: 5
    });
  });
</script>

Leaves you with an 'this.defaults.dateFormat is undefined' error:

regstr = '.{' + this.defaults.dateFormat.length + ',}\\s+' + regstr;

Hour grid does not respect hourMin settings

I have a situation where I need to set the min and max hours to reflect the office hours of a client. I also want the grid to show up under the hours. However when I use the configuration below, the hour grid starts with 12a and goes through 5p rather than starting with the minimum hour that I've specified in the configuration. The slider values work as expected and create an hour of 8am when it is moved all the way to the left.

$('#appointmentDate').datetimepicker({
ampm: true,
timeFormat: 'h:mm tt',
hourMin: 8,
hourMax: 18,
hourGrid: 1,
minuteGrid: 15,
stepMinute: 15
}
);

The hour grid contains the following for that configuration:
12a 01a 02a 03a 04a 05a 06a 07a 08a 09a 10a 11a 12p 01p 02p 03p 04p 05p

Including timepicker breaks existing datepicker 'setDate' method.

Problem: I have an existing datepicker usage. I include the timepicker JS and this line breaks:

$( "#eventdate" ).datepicker('setDate', 'today');

Looks like the '_setDateDatepicker' function on line 725 expects the argument to always be a date object; the datepicker docs say different (you can use words like 'Now', 'today', etc.).

Workaround: instead of string 'today', pass an empty Date object:

$( "#eventdate" ).datepicker('setDate', (new Date()));

The Error I got (from Opera 11.00 on WinXP 32-bit):

Uncaught exception: TypeError: 'date.getTime' is not a function


Error thrown at line 726, column 1 in (target, date) in http://leaflock.net/results/jquery-ui-timepicker-addon.js:
    var inst = this._getInst(target),
called from line 545, column 45 in () in http://leaflock.net/results/js/jquery-ui-1.8.7.custom.min.js:
    typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)
called via Function.prototype.apply() from line 33, column 27 in (j, s, v) in http://leaflock.net/results/jquery.js:
    for(v=j[0];H(j, s) in http://leaflock.net/results/jquery.js:
    return b.each(this,j,s)
called from line 545, column 0 in (a) in http://leaflock.net/results/js/jquery-ui-1.8.7.custom.min.js:
    return this.each(function(){typeof a=="string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})
called from line 18, column 3 in () in http://leaflock.net/results/mediation:
    $( "#eventdate" ).datepicker('setDate', 'today');
called from line 29, column 165 in (j) in http://leaflock.net/results/jquery.js:
    j.call(t,b);
called via Function.prototype.call() from line 37, column 7 in () in http://leaflock.net/results/jquery.js:
    b.ready()

beforeShow problem

Hello everybody and, first, congratulation to trentrichardson for his job.

Such as doublerebel recommended it to me, I made a new issue.

I have au little problem with the beforeShow what seems to not work.
Here down you'll find my code. If you replace .datetimepicker by .datepicker the code is working, but not with the datetimepicker.
If you use beforeShow with the datetimepicker, hour and minute seems also to not works.
I don't understand what do I wrong.

Thanks for your advices.

My version of dateTimePicker is 0.9.1

My code is :

var $j = jQuery.noConflict();
$j(function() {
$j("#ouverture").datetimepicker({showOn: "both",
speed: 'fast',
beforeShow: OptionsOuverture,
numberOfMonths: 2,
hideIfNoPrevNext: true,
timeOnlyTitle: 'Choissez l'heure',
timeText: 'Heure :',
hourText: 'Heures',
minuteText: 'Мinutes',
secondText: 'secondes',
currentText: 'Maintenant',
hour: 9,
minute: 0,
ampm: false
});
$j("#fermeture").datetimepicker({showOn: "both",
speed: 'fast',
beforeShow: OptionsOuverture,
numberOfMonths: 2,
hideIfNoPrevNext: true,
timeOnlyTitle: 'Choissez l'heure',
timeText: 'Heure :',
hourText: 'Heures',
minuteText: 'Мinutes',
secondText: 'secondes',
currentText: 'Maintenant',
hour: 15,
minute: 30,
ampm: false
});
});

function OptionsOuverture()
{
var dateMin = new Date();
var dateMax = null;
if ($j("#fermeture").datepicker("getDate") != null)
{
dateMax = $j("#fermeture").datepicker("getDate");
}
var Now = new Date();
if (Now.getMonth()>3)
{
dateMax = new Date(Now.getFullYear()+1,3,30,0,0,0);
}
else
{
dateMax = new Date(Now.getFullYear(),3,30,0,0,0);
}
return {
minDate: dateMin,
maxDate: dateMax
}
}

function OptionsFermeture()
{
var dateMin = new Date();
var dateMax = null;
if ($j("#ouverture").datepicker("getDate") != null)
{
dateMin = $j("#ouverture").datepicker("getDate");
}
var Now = new Date();
if (Now.getMonth()>3)
{
dateMax = new Date(Now.getFullYear()+1,3,30,0,0,0);
}
else
{
dateMax = new Date(Now.getFullYear(),3,30,0,0,0);
}
return {
minDate: dateMin,
maxDate: dateMax
}
}

minDate/maxDate problem

Hello

I have a form that contains two input fields, each with a datepicker. After adding the timepicker addon it does not work as intended.

When selecting a date in the first datetimepicker it should set the minDate of the second one but ends up changing the actual date in it while at the same time messing up the hours.

When the hours are set to a value below or equal to 12 in the first input field it becomes 00 in the second. If the hours are above 12 the value in the second input field is equal to the set value + 2.

The code used for min/max dates is the one posted below.

onSelect : function(selectedDate) {
var option = this.id == "dateFrom" ? "minDate" : "maxDate";
var instance = $(this).data("datepicker");
var date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
datePickers.not(this).datetimepicker("option", option, date);
}

Now it is not impossible that I have missed some aspect to using this addon and that the above code is faulty and if so is I apologize but I have been at this problem for a few hours now and it is driving me crazy. :)

I have done some debugging and at least the time issue seems to located to the $.datepicker._setDate function at line 828 but I might be wrong.

It should be noted I am using the latest version, 0.8.

Any help or insight is appreciated
Regards
Robert Krantz

Two datetimepickers: set minDate on one, changes val of the other.

Seen in both 0.91 dev and 0.91 stable:

Steps to reproduce, in Firefox:

  1. Put two dtpickers on the page, instantiated however you like.
  2. Make the following call:


```
$("#first-time-picker").datetimepicker('option', 'minDate', null);
```

  1. If the second datetimepicker had a value equal to the empty string, then it will now receive the current datetime as its value, even though the call from step 2 (seemingly) makes no call to the second time picker. It should remain blank, as it does with the plain, old datepicker.

minimum values with grid enable

Hello,
When you set a hourgrid and hourmin != 0, then the line under each bar show wrong start values, because the hourgrid start from 00 and not from hourmin
and if you have select 1 month per view then some times this line finished out of the dialog box
this issue exists also on minutes and second,

example which produce this issue
{
hourGrid : 2,
hourMin : 8,
stepHour : 1
}

Thnks!

Validate Form input field after pressing OK

If you select date on DatePicker it automaticly validates form field linked to DatePicker. It woudl be nice to have this feature in TimePicker.

I tried to add this feature, but it only worked if I closed timepicker without changing time

onClose: function(dateText, dp_inst) {
if (tp_inst.timeDefined === true && $input.val() != '')
tp_inst._updateDateTime(dp_inst);
if ($.isFunction(o.onClose))
o.onClose(dateText, dp_inst);

                this.form.validate().element(this);
            },

Using Ctrl+F5 : .timepicker null and _newInst not called

Version 9.1 [lastest from dev, wan't working with version from Thursday]
When I use Ctrl+F5 on my page, I got a "$.timepicker" is null javascript message.
I did put an alert in _newInst which is only called when I press F5.
What bothers me is that it sometimes happen using F5 but not everytime ...

Here is my sample :
I got a datetimepicker in a jquery-ui dialog. My page is a bit long to load (3/4 s) for information (due to some processing to create an image).
I tried to put everything in $(document).ready, but the problem keeps coming.

$(window).load(function() {
// Date picker
$(function() {
var optionsTp = {
buttonImage: '/calendar/calendrier.gif',
buttonText: 'Sélectionner une date',
showOn: 'both',
timeOnlyTitle: 'Choix de l'heure',
timeText: 'Heure',
hourText: 'Heure',
minuteText: 'Minutes',
secondText: 'Secondes',
currentText: 'Maintenant',
dateFormat: ,
timeFormat: 'hh:mm',
showButtonPanel: false
};
$.datepicker.setDefaults($.datepicker.regional['fr']);
$( "#incidentDateDebut" ).datetimepicker(optionsTp);
$("#ui-datepicker-div").hide();
});

Thanks for taking a look at it! And good job with this component!

Wrong hourMax/minMax/secMax resulting in december 1899

When editing an input field with initially at least one of these conditions:

  • hour set to 23
  • minute set to 59
  • second set to 59

... the Timepicker defaults to december 1899. I looked in the code and I think the problem lies here:

hourMax = o.hourMax - (o.hourMax % o.stepHour),
minMax = o.minuteMax - (o.minuteMax % o.stepMinute),
secMax = o.secondMax - (o.secondMax % o.stepSecond),

I changed it into this now, and that seems to work for me:

hourMax = Math.ceil(o.hourMax - (o.hourMax % o.stepHour)),
minMax = Math.ceil(o.minuteMax - (o.minuteMax % o.stepMinute)),
secMax = Math.ceil(o.secondMax - (o.secondMax % o.stepSecond)),

This is the version I'm using:

  • jQuery timepicker addon
  • By: Trent Richardson [http://trentrichardson.com]
  • Version 0.9
  • Last Modified: 11/29/2010

date picker hide after the date selected

Hi,
when I choose date in datepicker, the picker is hidden without validation by "done" button (bottom right on widget).
I must focus again on input for show the picker and select hour.
I have the problem with local test (using v0.8.1) but not with the demo on http://trentrichardson.com/examples/timepicker/ (using v0.8.0)

It's a bug or I forget a new option ?

I use :

  • jQuery-Timepicker-Addon 0.8.1
  • jQuery 1.4.3 (on CDN google)
  • jQuery UI 1.8.6 (on CDN google)

I call :
$("#test").datetimepicker();

Test with:

  • FF 3.6.12
  • google Chrome 7.0.517.44
  • Win XP 5.1 SP3

P.S. sorry for my english... :/

set minDate with two dtpickers on page is broken

Steps to reproduce, in Firefox:

  1. Put two dtpickers on the page.
  2. In the setup of the first dtpicker, create a onSelect function that sets the minDate of the second dtpicker to the value selected for the first dtpicker. Something like this:

    $("#first-time-picker").datetimepicker({
       onSelect: function(selectedDate){
           $("#second-time-picker").datetimepicker('option', 'minDate', selectedDate);
       }
     })

You will get a Javascript error so long as the second time picker has not already been instantiated. This is because the dtpicker code is trying to pull the date out of the second time picker for some reason, when it should really be pulling it out the first. The code is backwards. I think the problem is in the overridden _setDatePicker and _getDatePicker functions in the file, Trent.

Setting Restrictions

I am asking because I haven't seen this anywhere in the examples:

Is it possible to set restrictions on the timepicker? (i.e. Have the slider range from 6:00AM to 5:00PM only)

Thanks for your help.

_parseTime() doesn't actually return anything

On line 161 the _parseTime() method is correctly parsing the time in the input box, but then is not returning anything, despite the return value (always null) being consumed in _addTimePicker()

Show time in AM/PM 12 hour format

When using this feature the hours change as follows:

11:00 AM
12:00 AM
12:00 PM
01:00 PM

Also the hours start at 00:00

Is there a way to start the hours at 12:00 AM and then have the hours go as follows:

11:00 AM
12:00 PM
01:00 PM

*edit:

I think that I may have found the issue. When the slider is moved it moves in numerical increments that are not whole numbers, i.e. 11.2, 11.35, 11.5, etc.. I found that between 11.5 and 12 the 12:00 AM value will show. Therefore I changed the code in the the onTimeChange() function. I changed:

onTimeChange: function(dp_inst, tp_inst) {
var hour = tp_inst.hour_slider.slider('value');
var minute = tp_inst.minute_slider.slider('value');
var second = tp_inst.second_slider.slider('value');
var ampm = (hour < 12) ? 'AM' : 'PM';
var hasChanged = false;

to:

onTimeChange: function(dp_inst, tp_inst) {
var hour = tp_inst.hour_slider.slider('value');
var minute = tp_inst.minute_slider.slider('value');
var second = tp_inst.second_slider.slider('value');
var ampm = (hour < 11.5) ? 'AM' : 'PM';
hour = ((hour > 11.5 && hour < 12) || hour < 1) ? 12 : hour;
var hasChanged = false;

This changes the slider to start at hour 12:00 AM and the go up from there:

12:00 AM
01:00 AM
02:00 AM
03:00 AM
04:00 AM
05:00 AM
06:00 AM
07:00 AM
08:00 AM
09:00 AM
10:00 AM
11:00 AM
12:00 PM
01:00 PM
02:00 PM
03:00 PM
.
.
.
etc...

Time range issue

Hi
I try to set a time range between eg 8:15 and 17:45 with hourMin hourMax and minuteMin and minuteMax.

It should look like:
8:15->8:59
9:00->9:59
...
17:00->17:45

but it looks like:
8:15->8:45
9:15->9:45
...

Calling setDate before .beforeShowFunc() has fired.

Trying to set the date/time before the user has opened the date-time picker. The error below occurs, I've tracked it down to the fact that the beforeShowFunc event has not yet fired; hence not everything has been initialized at this stage.

The error is:
this.$input is null” on line 485 of jquery-ui-timepicker-addon-0.7.1.js

Last hour minutes problem

Hi,
There is a defect when you pick 23th hour in 24h format or 11th hour in 12h format. Then minutes always appear with leading '0' - example:
if you type 02/02/2010 23:23 it turns that to 02/0/2/2010 23:023 (24h format) or
if you type 02/02/2010 11:23 it turns that to 02/0/2/2010 11:023 (12h format).
Regards

Problem with setDate method

IE 8 throws an error on line 725 (dev branche). It looks like it does not like the double exclamation marks (!!date).

Issue with 23h, 59mn and 59s

Hi,

When I pre-filled attribute "value" of the field with 23h, 59mn or 59s and then I open datetimepicker, the date becomes 31/12/1899 : /

I use timepicker 0.9 with Firefox 3.6.12

Misnamed variable.

Am new to the whole github thing and don't really have the time to read up on it, etc, but I did want to mention that line 472 of the timepicker JS file has a reference to "charl" that should instead read "chrl". Just FYI.

-- NC

Using Ctrl+F5 : .timepicker null and _newInst not called

[Sorry for double post, but it seems my first issue (n°51) has been put directly in the closed categorie somehow]

Version 9.1 [lastest from dev, wan't working with version from Thursday]
When I use Ctrl+F5 on my page, I got a "$.timepicker" is null javascript message.
I did put an alert in _newInst which is only called when I press F5.
What bothers me is that it sometimes happen using F5 but not everytime ...

Here is my sample :
I got a datetimepicker in a jquery-ui dialog. My page is a bit long to load (3/4 s) for information (due to some processing to create an image).
I tried to put everything in $(document).ready, but the problem keeps coming.

$(window).load(function() {
    // Date picker
    $(function() {
        var optionsTp = {
                buttonImage: '<?php echo $_SESSION['IMAGE_PATH']?>/calendar/calendrier.gif',
                buttonText: 'Sélectionner une date', 
                showOn: 'both',
                timeOnlyTitle: 'Choix de l\'heure',
                timeText: 'Heure',
                hourText: 'Heure',
                minuteText: 'Minutes',
                secondText: 'Secondes',
                currentText: 'Maintenant',
                dateFormat: <?php echo "'".$_SESSION["DATEPICKER_DISPLAY_DATE"]."'"?>,
                timeFormat: 'hh:mm',
                showButtonPanel: false
            };
            $.datepicker.setDefaults($.datepicker.regional['fr']);
        $( "#incidentDateDebut" ).datetimepicker(optionsTp);
        $("#ui-datepicker-div").hide();
});

Thanks for taking a look at it! And good job with this component!

Browser : IE 7.0.6001.18000
JQuery-UI version 1.8.4

Hi there, well I found out that just if I remove the code above;
so just adding the <script src="xxxx/jquery-timepicker.js"/> to the page, creates a "datepicker is null" javascript error in the line 572 :
$.datepicker._base_selectDate = $.datepicker._selectDate;

compatibility issue with datapicker widget

I’m the developer of Roundcube calendar plugin. I plan to use the addon but have compatibility problems with default datepicker widget. When initializing a datepicker $(‘#mydiv’).datepicker({}) the method .datepicker( “getDate” ) returns null.

It starts working again when commenting line 724 – 748 in the addon script. But sure that’s not a good solution.

Is there any fix for it?

Localization strings ignored

Hi,

I'm trying to localize the timepicker but the new definitions (timeOnlyTitle, timeText,...) are ignored. The changes to the definitions file are correctly shown on the datepicker, but not on the timepicker. Tried to add $.timepicker.setDefaults($.timepicker.regional['es']); but still no luck. Am I missing something?

Regards.

DatePicker select display not updating

When a date is selected, the date is properly updated in the textbox, but the calendar does not update to show the selected date in the correct color. I looked at modifying the script. I'm assuming it has to do with overriding the _selectDate function to keep the window open, but I don't know javascript well enough to implement a fix.

If "Now button" is used, "getDate" returns null

If the user clicks Now, getDate returns null.
If the user clicks Now and then change time getDate returns null.
If the user clicks Now and then change/click date getDate returns the correct value.

var optionsTp = {
timeOnlyTitle: 'Choix de l'heure',
timeText: 'Heure',
hourText: 'Heure',
minuteText: 'Minutes',
secondText: 'Secondes',
currentText: 'Maintenant',
dateFormat: ,
timeFormat: 'hh:mm'
};
$.datepicker.setDefaults($.datepicker.regional['fr']);
$( "#condamnDatePose" ).datetimepicker(optionsTp);
...
function checkData() {
alert ($( "#condamnDatePose" ).datetimepicker( "getDate" ));
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.