Git Product home page Git Product logo

Comments (7)

vitalets avatar vitalets commented on May 29, 2024

You are going right way! The only thing confusing me is that ng-model defined inside wrappong div not timepicker directive itself. Could you check timepicker itself can it work with syntax:

<timepicker ng-model="mytime" hour-step="1" minute-step="1" show-meridian="false"></timepicker>

from angular-xeditable.

igler avatar igler commented on May 29, 2024

Well it works, but if I add the onaftersave="changed()", then this function is not called. If I write

<a href="#" editable-time="mytime" onaftersave="changed()">
    {{mytime}}
</a>

... it only works once. I can change the time, save it (changed-fucntion is also fired), but when I want to change it again, then the time is empty.

from angular-xeditable.

vitalets avatar vitalets commented on May 29, 2024

such behavior fixed in 0.1.4.
could you re-check with custom time directive?
thx

from angular-xeditable.

igler avatar igler commented on May 29, 2024

I can now edit the time more than once, this is fixed. But the changed()-function is not called. The directive I use is:

//timepicker
angular.module('xeditable').directive('editableTime', [ 'editableDirectiveFactory', function(editableDirectiveFactory) {
    return editableDirectiveFactory({
        directiveName : 'editableTime',
        inputTpl : '<timepicker hour-step="1" minute-step="1" show-meridian="false"><timepicker>'
    });
} ]);

Do I have to add some more parameters to the directive so onaftersave is handled?

from angular-xeditable.

igler avatar igler commented on May 29, 2024

... sorry, it works. There was still a timepicker script included from angular-ui-bootstrap. After excluding this one it works now as expected. Thanx.

from angular-xeditable.

vitalets avatar vitalets commented on May 29, 2024

ok.
I plan to include timepicker to future release.

from angular-xeditable.

igler avatar igler commented on May 29, 2024

Unfortunately there is still a small bug. When I change the time it is not saved to the scope variable. The onaftersave is called and works. When I use the timepicker outside of angular-xeditable it works. I do not use any library that implements timepicker. It works outside somehow out of the box, at least outside of angular-xeditable. Don't know why. What I use at a different side is bootstrap-datetimepicker. Maybe this one implements the necessary functions and disturbs angular-xeditable?

from angular-xeditable.

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.