Git Product home page Git Product logo

bootstrap-datetimepicker's Introduction

Deprecation warning!

This repository has been deprecated in favour of this.

bootstrap-datetimepicker's People

Contributors

auspexeu avatar booda406 avatar corylutton avatar davidpatters0n avatar duschang27 avatar eclipselcy avatar etomilin avatar fafa973 avatar fy0 avatar g00fy- avatar gbh avatar hayk avatar huang-x-h avatar ias-dt avatar igame2000 avatar j3l11234 avatar jan-stanek avatar khenderick avatar krazyjakee avatar krlos2011 avatar mczolko avatar merekel avatar miguelcobain avatar polinom avatar rebornishard avatar renekorss avatar riccardonar avatar shabda avatar smalot avatar zur4ik 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

bootstrap-datetimepicker's Issues

Today Button

The today button is not setting the current date value. It seems to be pulling the value from data-date, or the last field value.

In month view, it is changing the calendar to the correct month, but it does not highlight the day.

I've tested it with the Advanced demo on your site in IE9 and FireFox 17.0.1 on a Windows 7 machine.

Thanks,
Michael

Today button doesn't close automaticly

Is it possible to have the datetimepicker auto-closed when you specify options like this:

{
"todayBtn" : "linked",
"autoclose" : "true"
}

So clicking on date and time would close the form for me, but clicking on "today" not, even though I selected the date.

When used as only a timepicker, allow disabling of date.

When used as a separate timepicker without the datepicker options, the date says it is "31 December 1899". Please disable this or allow disabling through an option.

Options I used:

            $('.timepicker').datetimepicker({
                format: 'HH:ii p',
                autoclose: true,
                // todayHighlight: true,
                showMeridian: true,
                startView: 1,
                maxView: 1
            });

Example

On edit the date goes back

When i set a new date and time, save it and then want to edit it, by clicking on the input the time switches to the date of today.

Example:

Yesterday i have set the time to 28.01.2013, 20:00, and saved my post, and today i wanted to change the time do 30.01.2013, 20:00, but wen i edited my post and clicked on the input the time went to 28.01.2013, 00:00

Is this a bug or is there an options that i've missed that corrects this?

Support month only

I tried use datetimepicker for picking month/year, it works except by not updating the input field.

$('.monthpicker').datetimepicker({format: 'mm/yyyy', startView: 'year', minView: 'year', autoclose: true})

It would be nice it datetimepicker, setting default values for the missing views, works for this case scenario.

Thanks,
Jose Peleteiro

Time Only

As mentioned in #6 I am trying to implement a time only field with the following code:

$('input.time-picker').datetimepicker({format:"hh:ii",maxView:0,minView:0,startView:0,autoclose:true});

But the above does not work as expected. Starting view is month and date selected shows above the times.

Awesome work and thanks in advance!

Parsing issue when manually entering date

Hi,

I am using a UK date format ( dd/mm/yyyy hh:mm:ss ): -

09/01/2013 12:01:00

I tried to change to

09/01/2013 12:00:00

It parsed to: -

09/12/2013 12:12:00

When I clicked off the date box.

All the best,
Ash

Disabled day is still preselected

When daysOfWeekDisabled: [0] and the day current is Sunday the current day is selected. In my opinion, the current day preselection should be cancelled if the current day is a disabled day.

A now button

Is there an way in which a now button could be added?

So the user opens the picker, hits now and the current date and time are added in one hit - rather then clicking through the options.

Specify intervals in time select

Very nice plug in - definitely the best of its kind I've seen.

Would be great to be able to specify the intervals on the time selector, so you could have every 5 mins (as it currently is) or 15mins, 30mins etc.

Hours Range

Is it possible to disable some hours: eg the time picker only shows or allow to select from 8 am to 3 pm

Parsing problem with custom words

Hi,
can I set a format like the following?

dd M yyyy hours hh:ii

because the word "hours" make the datetimepicker not working property.
I'm using the last version.

Thanks so much!

Fabio

Formatted date in event

Hi all !

I need some help...

During an event 'changeDate' is it possible to convert directly ev.date.valueOf() using the 'format' or 'LinkFormat' ?

more options for pickerPosition

Would it be possible to have at least 'top' position for the picker?
Use-case is when the field is at the very bottom of the page. Picker appears under it, and completely out of the view.

Only First row is generated by the calender

1484012223
hi i am facing this problem that only the first row in generated by the calender means only first row of each month is generated. and there is no other rows generated by the plugin.

i have simply called this

$('.form_datetime').datetimepicker({
format: "dd MM yyyy - hh:ii",
weekStart: 1,
minView:0,
todayBtn: 1,
autoclose: 1,
todayHighlight: 1,
startView: 2,
forceParse: 0
});

the default code. and interesting one is this that when anyone open the site from canada it looks like this but when opened from some other country all works fine. i have checked on multiple location with different pcs and browsers in canada but all giving the same result.

Max CPU after year editing

Manual edit of "d MM yyyy"-formatted date results in a very long running process. Other formats will most likely be affected as well.

Chromium_2013-01-18_14-15-47

Set minView, maxView, startView

I'd like to use one datetime picker that I can adjust these options before showing. I have three buttons that are Labeled now, today, future. Now shows no datetime picker. Today should show the hour selection view through minute selection view without the ability to move to day selection view. Future shows the day selection as the start view without any restrictions.

I know I can simply create two datetime pickers but was wondering if there would be an easy way to update these options on an already initialized picker. This would simplify my code a bit and might be useful in other use cases.

Highlight hours (and minutes) only on the selected dates

Steps:

Select datetime 2013-03-19 12:30. Close calendar. Open calendar. Select date 2013-03-20.

On the hour view 12:00 is preselected although that time has nothing to do with the time on the previous day, except that it's 24 hours apart. In my opinion 12:00 should only be highlighted on 2013-03-19.

When use minView datetimepicker doesnot work

I use the newest version downloaded from your github and
$("#datepicker").datetimepicker( {
todayBtn: true,
format: "yyyy",
startView: "decade",
minView: 4,
maxView: 5
});

and

$("#datepicker").datetimepicker( {
todayBtn: true,
format: "yyyy",
startView: 5,
minView: 4,
maxView: 5
});

is still not working! What is the problem please?

Current startDate with all hours activated

Hi,

If I set the startDate: '+1d', then all the hours in that particular date should be activated.
Now it is only the current UTC time is activated all the previous hours are deactivated.

How can I activate all the hours by disabling the previous dates?

Thanks,
Sri

change events after fill

Can the change events for each part be triggered both before and after the html is generated? I'd like to get in and make adjustments to the display before the filled html is actually rendered. I attempted doing this but it seems the events are triggered too early. Maybe switching to a before/after change format?

My quick fix was to simply duplicate the trigger events where needed but an official solution would be great

How to assign the value of datetime with ng-model?

Hey @smalot

I have been trying to associate the value with ng-model like the following

 <div class="controls">
          <div class="control-group input-append date form_datetime" data-date="2012-12-21T15:25:00Z">
            <input size="16" type="text" ng-model="transaction.date" readonly>
            <span class="add-on"><em class="icon-remove"></em></span>
            <span class="add-on"><em class="icon-th"></em></span>
          </div>

As you can see the line ng-model="transaction.date"

But when I console.log, I see that the transaction.date is undefined.

How can I put the value selected by datetime picker in ng-model?

Thanks

minView and maxView not working

When minView is set the maxView value is not respected. This means if you wanted to use the component as just a datepicker you might do something like this:

$("#datetimepicker").datetimepicker( {
format: "yyyy-mm-dd",
startView: "month",
minView: "month",
maxView: "decade"
});

The result is a picker that will not go below the month view (good) but it will also not go above the month view (bad).

jsfiddle example: http://jsfiddle.net/4qEru/1/
related issue: #3

Support for AM/PM

Adding support for displaying the hour picker based on 12 hours with AM/PM instead of 24 hours.

H for 12 hour format.
HH for 12 hour format, with leading 0's
a or P for am / pm.
a/A is used with PHP's date function (http://php.net/manual/en/function.date.php)
p/P is used pretty much everywhere else. python, ruby, bash, etc.

note, a and P denote lowercase am/pm, while A and p denote uppercase AM/PM.

Thanks!

Picker representing offset time as UTC

Hi.

Really useful widget, thank you for putting in the effort.

I'm having a problem with picked date-times and time zones, hopefully I'm just missing something and you can point me in the right direction.

My browser is in BST (GMT+01:00) and new Date.getTimezoneOffset() returns the, expected, -60.

The picker pops up and I can select a date & time in the browser local TZ.

However the value going into the input field, despite my specifying a format of 'yyyy-mm-ddThh:ii:ssZ', is still in the local time, no time zone adjustment to UTC has been made.

When the server receives this and interprets it as UTC of course the time is wrong.

I can't see any discussion of TZ issues in the docs and I'd prefer not to use an onSubmit shim to do the TZ adjustment manually unless necessary.

Am I missing something here?

Kind regards,

Matt

Parsed date is considered as UTC

Thanks for awesome plugin & sopport.

With this configuration

$('.date').each(function(i, el) {
    el = $(el);
    el.get(0).type = 'text';
    el.datetimepicker({
        startDate: '2013-01-27,
        weekStart: 1,
        minView: 'month',
        format: 'd. m. yyyy',
        autoclose: true
    });
    el.datetimepicker('hide');
});

I am still able to click on 26th (and it will also fill).

It's caused becasu setting date as UTC: https://github.com/smalot/bootstrap-datetimepicker/blob/master/js/bootstrap-datetimepicker.js#L1057

But I'do not want to work with UTC. If I would, I will provide argument with "Z".

Using the datetimepicker with a label instead of an input

Hi. I want to know if it is possible to achieve this kind of behavior:
I have two buttons, one for "Send Now" and one for "Schedule". They behave as radio buttons: Send Now is active by default and if I click Schedule I change the active button.
I want the user to click the Schedule button, open the datetimepicker, pick date and time, and then close the picker. Instead of showing the selected value in an input, I want to change the text of my button.
Is this possible?

If minute step is skipped, add full hour

Example: www.senditlater.org

I use "minView: 0". When I have selected a day and an hour (e.g. 16:00) and click somewhere on the page to close the calendar I would expect it to insert 16:00 into the text field. Instead the current minutes are used (e.g. 16:34).

Changing locale causes links to break

Hello,
I am running a RTL website, when I use your plugin in its native language (EN) links and functionally runs normally, even thought the site is RTL. When i try to include a custom translation the links in the time picker suddenly break.

Allow disabled times

It would be great if I could not only disable days but specific time ranges (preferably individually for each day) as well

Time picker does not advance correctly when time falls at the end of an hour

If we're using the time picker set to 5m increments, with the start date set to the current date/time (i.e. only pick a future time), and we pop up the picker at, say, 13:58 then the picker displays:

13:00 13:05 .... 13:50 13:55

all greyed out and you have to advance to the next hour to see a selectable time.

It might be useful if the picker would detect this and automatically advance to the make the next available time selectable.

Kind regards,

Matt

Inconsistencies with UTC dates and times

I'm not sure if I'm doing something wrong, but I'm basically trying to make it so that a second calendar starts after the first one ends, and the timing is off by 8 hours (UTC/GMT inconsistency). Basically, it allows the second calendar to have date-times that come 8 hours before the first calendar's:

var pickup = $('#pickup').datetimepicker({
  showMeridian: true,
  format: 'yyyy-mm-dd H:ii P',
  minuteStep: 15,
  autoclose: true
}).on('changeDate', function(ev) {
  var newDate = new Date(ev.date);
  newDate.setDate(newDate.getDate());
  dropoff.datetimepicker('setStartDate', newDate);
  $('#dropoff').focus();
});
var dropoff = $('#dropoff').datetimepicker({
  showMeridian: true,
  format: 'yyyy-mm-dd H:ii P',
  minuteStep: 15,
  autoclose: true
});

Anyone know how to resolve this issue--I want everything relative to each other. Calling .date should return the value that the user sees (which is considered UTC currently), not the UTC-8 version as it does currently.

Meridian format option is backwards/opposite

format: 'HH:ii p'

p : meridian in lower case ('am' or 'pm') - according to locale file
P : meridian in upper case ('AM' or 'PM') - according to locale file

Lower case 'p' shows upper case meridian and upper case 'P' shows lower case meridian.

Can the keyboard navigate to subsequent date/time selections on hitting enter?

We have the following views for a calendar look up in our application: month, day (hours), hour (10 mins). It works brilliantly, however on the keyboard, if you select a day in view one, it adds the date, when it would be preferable if it took you to the hour view (and then to the ten min view on subsequent enter).

Once at the bottom of the pile, it should append the date and close the UI.

This would be mighty useful!

startDate & clickinng to disabled days

If you have defined startDate and you click to disabled days, the time picker is shown and the minimum day is selected.

I suggest do nothing after clicking on disabled days.

Only icon-th support, and not icon-calendar

Instead of using (default) icon-th I wanted to use icon-calendar but my picker didn't work. I've spent some time figuring out that the problem is in icon selection.

a5

this is what I get (before even clicking on the icon)

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.