xdan / datetimepicker

jQuery Plugin Date and Time Picker
https://xdsoft.net/jqplugins/datetimepicker/
MIT License
3.5k stars 1.51k forks source link

can't find DateFormatter in 2.4.6 #392

Open kellyselden opened 8 years ago

kellyselden commented 8 years ago

not ok 1 PhantomJS 2.1 - Global error: ReferenceError: Can't find variable: DateFormatter

worked in 2.4.5

panthony commented 8 years ago

Same here, the 2.4.6 release broke my app I had to force the 2.4.5 version to get it working again

Uncaught ReferenceError: DateFormatter is not defined

stefanbraspenning commented 8 years ago

screen shot 2016-02-15 at 14 38 24

valkirilov commented 8 years ago

+1

konradrr commented 8 years ago

I have the same issue, 2.4.6 ver. seems to be broken

diskit commented 8 years ago

+1

JiveDig commented 8 years ago

+1

kenelliott commented 8 years ago

+1

axelguiloff commented 8 years ago

+1

ghost commented 8 years ago

+1

chrismllr commented 8 years ago

Also having this issue, also in 2.4.7

Able1991 commented 8 years ago

+1 Uncaught ReferenceError: DateFormatter is not defined

itamark commented 8 years ago

Um. +1.

xdan commented 8 years ago

Not so long ago switched dateparser plug-in library

bower install php-date-formatter

But it is already in build/jquery.datetimepicker.full.min.js so you can use it

levacic commented 8 years ago

@xdan Can you add that package as a dependency to bower.json?

benbabics commented 8 years ago

+1

liangkaile commented 8 years ago

+1

xdan commented 8 years ago

Added

valkirilov commented 8 years ago

Still not fixed:

Uncaught ReferenceError: DateFormatter is not defined
ashish-joshi-sr commented 8 years ago

yes still having

Uncaught ReferenceError: DateFormatter is not defined

willemvb commented 8 years ago

If you're installing via npm, require('jquery-datetimepicker/build/jquery.datetimepicker.full') worked for me —instead of require('jquery-datetimepicker'). See PR #399

ashish-joshi-sr commented 8 years ago

yes it works fine when install it using npm... thanks..

IoannesPaulus commented 8 years ago

+1

3ynm commented 8 years ago

+1

syed-haroon commented 8 years ago

use build/jquery.datetimepicker.full.min.js rather jquery.datetimepicker.min.js to fix Uncaught ReferenceError: DateFormatter is not defined error.

wonderchang commented 8 years ago

If the workable scripts can be accessed in build/, why not just remove the jquery.datetimepicker.min.js?

jxbolt commented 8 years ago

The .min.js file has code from another jquery plugin pasted into the top. Here is the JS file for the other plugin https://github.com/kartik-v/php-date-formatter/blob/master/js/php-date-formatter.js

jmnote commented 8 years ago

+1

syastrebov commented 8 years ago

fixed

3ynm commented 8 years ago

Initially I've posted saying it's not fixed for me. Because I did use the file inside the build folder.

Now the DateFormatter error does not appear, but I don't know how to use Moment.js then. When following the instructions to change according formatter to documentation, the Javascript console shows:

TypeError: $.datetimepicker.setDateFormatter is not a function TypeError: i.dateFormat is not a function

stibay commented 8 years ago

Still not fixed in unminified file in 2.5.4. Minified file works.

RDelorier commented 8 years ago

I just fought with with today and came up with this solution if anyone still needs it package,json

"browser": {
    "jquery": "./node_modules/jquery/dist/jquery.js",
    "foundation": "./node_modules/zurb-foundation-5/js/foundation/foundation.js",
    "php-date-formatter": "./node_modules/php-date-formatter/js/php-date-formatter.js",
    "jquery-datetimepicker": "./node_modules/jquery-datetimepicker/jquery.datetimepicker.js"
  },
  "browserify-shim": {
    "jquery": "$",
    "foundation": { "exports": "foundation", "depends": ["jquery:$"]},
    "php-date-formatter": "DateFormatter",
    "jquery-datetimepicker": { "depends": ["php-date-formatter:DateFormatter"]}
  }

Then import and use:

require('jquery-mousewheel')($)
require('jquery-datetimepicker')($)

$('#myEl').datetimepicker()

sample is from a vue-cli generated project using browserify and imported in a .vue file

vdrasutis commented 8 years ago

+1, still not working (not minified version).

Quix0r commented 8 years ago

Jupp, still coming. (2.5.4)

pgs-pliulia commented 7 years ago

+1 still coming (2.5.4)

xovel commented 7 years ago

+1, still coming. latest version

Quix0r commented 7 years ago

I think no need for over-confirming bug. I think the devs are/were out for Christmas and now upcoming New Year event.

flaviolaino commented 7 years ago

+1

Iworb commented 7 years ago

Is there some progress around this bug? It still appears in latest version.

Quix0r commented 7 years ago

Please take a look at the referencing commits, I think we have to be patient.

Wuyunong commented 7 years ago

+3

farizluqman commented 7 years ago

+9999999999

bpirtle-nova commented 6 years ago

+1

kris-fs commented 5 years ago

Good day,

If there are still anyone having this problem, I resolve this by specifying the php-date-formatter in bower to use version 1.3.4. NPM does not carry this version and automatically installs 1.3.5 which does not set the DateFormatter as a function. in bower.json set the dependencies to "php-date-formatter": "kartik-v/php-date-formatter#v1.3.4"

Hope this helps.