Git Product home page Git Product logo

core's People

Contributors

cdubz avatar dependabot[bot] avatar eonasdan avatar insodev avatar jbtronics avatar kristofdegrave avatar lexmark-haputman avatar starzu avatar tonix-tuft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

core's Issues

Documentation

When do you think you might have some basic documentation on how to import and render the modules?

hide and show event not emit when date is null

_notifyEvent does not emit those events when date and oldDate are null.
This is annoying if we want to plug to those events (for example we remove the overflow to make the popup fully visible).
I think for those 2 events it makes sense to emit with a null date.

viewDate function does not notify component

Calling viewDate function with a valid moment object as argument does not notify changes to the view. Something like $('#datetimepicker1').datetimepicker('viewDate', moment('11/21/2018', 'MM/DD/YYYY') ); has no effect on the datetimepicker.

Live example on this question on Stack Overflow using jQuery 2.1.1, moment 2.22.2, bootstrap 4.1.3 and tempus dominus 5.1.2.


I think that the issue is the _notifyEvent function that always returns without trigger event since:

if ((e.type === DateTimePicker.Event.CHANGE && (e.date && e.date.isSame(e.oldDate)) || !e.date && !e.oldDate))

is always true when this._viewUpdate() is called from viewDate function.

Locale does not change

If I call

myJqueryObj.datetimepicker('locale', newLocale)

the texts in the popup calendar (e.g.: day names) do not change. Calling

myJqueryObj.datetimepicker('format', newFormat)

works, so I guess the problem is not in my code :).

Reproduced with tempusdominus-bootstrap-4 5.0.0-alpha9

Uncaught TypeError: Cannot read property 'isSame' of undefined

This issue was previously reported on tempusdominus/bootstrap-4 for a long time but it probably belongs to core:

Reproduce:
go to tempusdominus site, usage, no icon
click on field (it is filled with today's date)
immediately clear this field (don't click anywhere, ctrl-A delete will do)
click outside

console will display:
tempusdominus-bootstrap-4.js:1947 Uncaught TypeError: Cannot read property 'isSame' of undefined at TempusDominusBootstrap4._updateMonths (tempusdominus-bootstrap-4.js:1947) at TempusDominusBootstrap4._fillDate (tempusdominus-bootstrap-4.js:2116) at TempusDominusBootstrap4._update (tempusdominus-bootstrap-4.js:401) at TempusDominusBootstrap4._setValue (tempusdominus-bootstrap-4.js:430) at TempusDominusBootstrap4._change (tempusdominus-bootstrap-4.js:493) at Function._jQueryHandleThis (tempusdominus-bootstrap-4.js:2699) at r.fn.init._jQueryInterface [as datetimepicker] (tempusdominus-bootstrap-4.js:2706) at HTMLInputElement.<anonymous> (tempusdominus-bootstrap-4.js:2734) at HTMLDocument.dispatch (jquery-3.2.1.slim.min.js:3) at HTMLDocument.q.handle (jquery-3.2.1.slim.min.js:3) _updateMonths @ tempusdominus-bootstrap-4.js:1947 _fillDate @ tempusdominus-bootstrap-4.js:2116 _update @ tempusdominus-bootstrap-4.js:401 _setValue @ tempusdominus-bootstrap-4.js:430 _change @ tempusdominus-bootstrap-4.js:493 _jQueryHandleThis @ tempusdominus-bootstrap-4.js:2699 _jQueryInterface @ tempusdominus-bootstrap-4.js:2706 (anonymous) @ tempusdominus-bootstrap-4.js:2734 dispatch @ jquery-3.2.1.slim.min.js:3 q.handle @ jquery-3.2.1.slim.min.js:3 trigger @ jquery-3.2.1.slim.min.js:3 (anonymous) @ jquery-3.2.1.slim.min.js:3 each @ jquery-3.2.1.slim.min.js:2 each @ jquery-3.2.1.slim.min.js:2 trigger @ jquery-3.2.1.slim.min.js:3 _notifyEvent @ tempusdominus-bootstrap-4.js:567 _setValue @ tempusdominus-bootstrap-4.js:425 _change @ tempusdominus-bootstrap-4.js:493 _jQueryHandleThis @ tempusdominus-bootstrap-4.js:2699 _jQueryInterface @ tempusdominus-bootstrap-4.js:2706 (anonymous) @ tempusdominus-bootstrap-4.js:2734 dispatch @ jquery-3.2.1.slim.min.js:3 q.handle @ jquery-3.2.1.slim.min.js:3 tempusdominus-bootstrap-4.js:2501 Uncaught TypeError: Cannot read property 'clone' of undefined at TempusDominusBootstrap4.hide (tempusdominus-bootstrap-4.js:2501) at Function._jQueryHandleThis (tempusdominus-bootstrap-4.js:2699) at r.fn.init._jQueryInterface [as datetimepicker] (tempusdominus-bootstrap-4.js:2706) at HTMLInputElement.<anonymous> (tempusdominus-bootstrap-4.js:2744) at HTMLDocument.dispatch (jquery-3.2.1.slim.min.js:3) at HTMLDocument.q.handle (jquery-3.2.1.slim.min.js:3) at Object.trigger (jquery-3.2.1.slim.min.js:3) at Object.simulate (jquery-3.2.1.slim.min.js:3) at HTMLDocument.c (jquery-3.2.1.slim.min.js:3) hide @ tempusdominus-bootstrap-4.js:2501 _jQueryHandleThis @ tempusdominus-bootstrap-4.js:2699 _jQueryInterface @ tempusdominus-bootstrap-4.js:2706 (anonymous) @ tempusdominus-bootstrap-4.js:2744 dispatch @ jquery-3.2.1.slim.min.js:3 q.handle @ jquery-3.2.1.slim.min.js:3 trigger @ jquery-3.2.1.slim.min.js:3 simulate @ jquery-3.2.1.slim.min.js:3 c @ jquery-3.2.1.slim.min.js:3

Uncaught TypeError: this._dates[index] is undefined

When using with useCurrent to false, the _change method calls _setValue without any index and so the value is stored at an undefined index in _dates. So later when calling date, the index is set by default to 0 but there is no value at this index.
I think _sevValue should fallback to 0 when index is undefined.

Remove dependency on jquery?

Hi,

The doc say:

This new version has been completely rewritten in ES6 and uses Babel to transpile the code down.

But jquery is still mentioned as a dependency. Is Tempusdominus using jquery still or is it just needed voor moment.js (and popper.js).

Greetz, flexjoly

Change DisabledTimeInterval on change.datetimepicker

Hi there,
i dont know if it fits here or on the boostrap4 repo that is use.

Problem:
I want to change the disabled time intervals for every selected date.

Current Outcome:
All hours are accepted after i changed a date.

Wanted Outcome:
The new interval is accepted and i cannot select the disabled times.

Here is a code example: https://jsfiddle.net/m6b0a8qf/1/

Thanks for the project and looking into this,
Dominik

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.