Git Product home page Git Product logo

timeentry's Introduction

jQuery Time Entry

This plugin sets an input field up to accept a time value using a spinner or the keyboard.

  • Set time format, including seconds and/or 24 hour time.
  • Integrates with mousewheel plugin.
  • Expandable spinner for easier use.
  • Over 20 localisations.

Have a look at the plugin Web site, http://keith-wood.name/timeEntry.html, for demonstrations of its abilities.

For documentation on the functionality see http://keith-wood.name/timeEntryRef.html.

timeentry's People

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

timeentry's Issues

Broken on jQuery 1.9.0

It seems it does not work with jQuery 1.9.0.

After I've updated jQuery from 1.8.2 to 1.9.0 it started to raise error.
In firebug console:

TypeError: $.browser is undefined
if ($.browser.mozilla) {

Android/Chrome: Textbox accepts all characters as input

Looks like on android, jquery events keypress and keydown are not triggered and as a result, input validation logic is broken.

Tested on:
Stock Android (7.1.2)
Chrome (58.0.3029.83)
Keyboard: Gboard (6.3.28.15901150-1rm64-v8a)

Mobile support

TimeEntry currently breaks when entering am/pm on mobile browsers (at least on Android). The numerical entries work fine, but when "a" or "p" is entered for AM/PM, the entire field blanks out. Have not tested the spinner.

Time Entry Change event doesn't work in Knockout Bindings

I am using knockout.js and jquery.timeentry. Well jquery.datetimeentry.js. But regardless of .js file I use, I can't get the change event to occur.

Here is my binding:
define('timeentry.bindings', ['jquery', 'ko', 'timeentry'], function ($, ko, timeentry) {
ko.bindingHandlers.datetimeentry = {
init: function (element, valueAccessor, allBindingsAccessor) {
//initialize datepicker with some optional options
var options = allBindingsAccessor().timepickerOptions || {};
$(element).datetimeEntry(options);

        //handle the field changing
        ko.utils.registerEventHandler(element, "change", function () {
            var observable = valueAccessor();
            console.log('here0');
            observable($(element).datetimeEntry("getDatetime"));
        });


        //handle disposal (if KO removes by the template binding)
        ko.utils.domNodeDisposal.addDisposeCallback(element, function () {
            $(element).datetimeEntry("remove");
        });

    },
    update: function (element, valueAccessor) {
        var value = ko.utils.unwrapObservable(valueAccessor()),
            current = $(element).datetimeEntry("getDatetime");

        if (value - current !== 0) {
            $(element).datetimeEntry("setDatetime", value);
        }
    }
};

});

conosole.log('here0'); never happens.

I have also used jquery. 1.11 and jquery 2.x to test both out.

Can't set 23:58 with timeentry

I can't edit the time 23:58 with the time format of 'HH: MM', after editing the plugin it changes the time to 00:12

Chrome version 97.0.4692.71

Bug: sould not be able to select & drag AM/PM text around the textbox in chrome,

The mouse is allowed to drag text around, as a result its submitting malformed test.

  • Solution: Disable drag /drop in textbox
  • Bootstrap theme-ing support
  • hours only format, do not display AM/PM just hours,
  • allow configurable default number of hours, on presseing the black default button besides the box. For e.g. let user select default 1 hr! or 8 hrs
    image

Clicking minute doesn't work on iPad

It's possible to move to the minute section by pressing the separator key (in this case, ":"), but tapping on minutes doesn't work (as it does on a desktop browser).

Minute Focus Issue

If you click up arrow a couple of times in minutes area, the minutes area loses focus and the hours gain focus in IE browser

Bug found with "unlimitedHours"

I set the parameter "unlimitedHours" to "true". Everything was fine when editing the field with an empty starter value.

But when i am retrieving the data, seems like "unlimitedHours" doesn't work.

I created a Plunker: http://plnkr.co/edit/yBYP3mRgrL3ARcVflBOV?p=preview, there, i set the value "100:00" for the input, but the value i see is "4:00". After the data retrieve, if we try to edit the input we can see that now it's working.

2.0.x versions do not work properly with IE8

With the latest version, you are only able to select the last 2 digits of the time. If you are using HH:MM then its the minutes part. If you are using HH:MM:AM/PM then it's the AM/PM part.

To move to the other parts of the time you have to use shift+tab as using the mouse to select that part of the input doesn't work.

This behaviour can be seen on the main Time Entry page keith-wood.name/timeEntry.html when using IE8.

1.5.2 is the last version that seems to work fine in IE8.

iOS safari bug

Plugin is working fine on desktop browsers and on android chrome browser, but in iOS safari browser there is a bug. After entering hours there seems to be no way to enter minutes. When trying to focus on minutes, focus comes back to hours.

Questions is: maybe someone had to deal with this bug and maybe there is some known fix?

TimeEntry does not work with new version of jquery.

I tried to use it with v3.1.1 but it did not work. In fact, it caused the whole site to have JS problems.

PS: I know this is an old plugin and have not had updates, but I think it is a great plugin and should be keep updated :)

unrecognized expression: ../img.timeEntry_control

We've been using version 1.0 of your plugin but need to upgrade to 1.11.1. In order to fix the time parsing for 12AM/PM bug. Replacing the plugin with the 1.11.1 version and clearing the browser cache produces this error. (below)

jquery.js:1498 Uncaught Error: Syntax error, unrecognized expression: ../img.timeEntry_control

We're using jQuery 1.11.3

$(selector).timeEntry({
spinnerImage: "",
defaultTime: ""
});

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.