Coder Social home page Coder Social logo

Comments (12)

maximepvrt avatar maximepvrt commented on June 8, 2024 3

I found the problem is when jquery is in our page: https://plnkr.co/edit/KhYvapIHBxX0nHRpwjmX?p=preview

from angular-datetime.

andertun avatar andertun commented on June 8, 2024

I made a plunker... but can't reproduce the issue. Do anyone have an idea what might be causing this (when used in a large app)?

from angular-datetime.

eight04 avatar eight04 commented on June 8, 2024

Thanks for the plunker! Is there any other library interacting with <input> element?

from angular-datetime.

andertun avatar andertun commented on June 8, 2024

Yes probably. This is the dependancy list (removed as many as I could).

angular.module('app', [
    'ui.router',
    'ngStorage',
    'ngDialog',
    'ngAudio',
    'datetime',
    'plupload.directive',
    'toastr'
])

Will also look into the directives we wrote ourselves, and see if any of them interact with <input> elements.

from angular-datetime.

eight04 avatar eight04 commented on June 8, 2024

I've increase the priority of the directive in v5.1.1. Try if it can fix your issue.

from angular-datetime.

andertun avatar andertun commented on June 8, 2024

I still have the issue. I just replaced datetime.js - did you change anything in custom-input?

from angular-datetime.

eight04 avatar eight04 commented on June 8, 2024

Nope. By increasing the priority, there is a chance to fix rendering issue (i.e. $render function is overwritten by other directives).

BTW, does it happen to the demo of custom-input too?
https://rawgit.com/eight04/custom-input/master/demo.html

from angular-datetime.

 avatar commented on June 8, 2024

I have the exact same issue. Additionally this happens when i just fill in parts of the date with numbers eg. i'm in the (day) section and type "1" followed by "1". After the second "1" is typed the cursor jumps to the end.

from angular-datetime.

maximepvrt avatar maximepvrt commented on June 8, 2024

Me too :(
And I tested after updating your directive with the best priority of my application.

from angular-datetime.

eight04 avatar eight04 commented on June 8, 2024

The problem is that jQuery has different behavior with el.val(undefined). In jqLite, el.val() and el.val(undefined) both return text value, but jQuery returns an jQuery object with el.val(undefined). I'll fix it later.

https://github.com/eight04/angular-datetime/blob/master/lib/directive.js#L67

from angular-datetime.

eight04 avatar eight04 commented on June 8, 2024

#48

Also, here is the plunker with it:
https://plnkr.co/edit/TbfZhkxYs0ZReazDzYyH?p=preview

from angular-datetime.

eight04 avatar eight04 commented on June 8, 2024

Fixed in 5.1.2.

from angular-datetime.

Related Issues (20)

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.