pickadate.js icon indicating copy to clipboard operation
pickadate.js copied to clipboard

Why we need picker.time reference in translations?

Open tamadamas opened this issue 10 years ago • 8 comments

I've got Uncaught TypeError: Cannot read property 'defaults' of undefined in my translation file. I've looked there

jQuery.extend( jQuery.fn.pickatime.defaults, {
    clear: 'удалить'
});

I don't need picktime in my application and don't want to include it? Can we split that to additional translation file?

tamadamas avatar Jun 02 '15 15:06 tamadamas

Same problem here. Another option would be to check if jQuery.fn.pickatime is defined and extend only if the object exists.

nnyman avatar Jun 13 '15 20:06 nnyman

same problem here. Just updated today and I'm kinda lost about what exactly is 'pickatime'. Is it another library that's supposed to interact with pickadate?

juanmartinzzz avatar Jul 08 '15 02:07 juanmartinzzz

Agh, that’s annoying.

As a temporary workaround, you can just stub it before including the translations files:

$.fn.pickatime = { defaults: {} }

amsul avatar Jul 12 '15 21:07 amsul

This is annoying, and the amsul workaround looks good, but not good for a quality product. Could you please just approve the #744 ?

ghost avatar Sep 16 '15 08:09 ghost

+1 plz approve the #744

jarnaiz avatar Mar 16 '16 09:03 jarnaiz

Since the new version @types/[email protected] the workaround above does not work anymore. I get the following error: Type '{ defaults: {}; }' is not assignable to type 'Pickatime'. Type '{ defaults: {}; }' provides no match for the signature '(keyword: "picker"): TimePicker'. I am working with +-- @types/[email protected] | `-- @types/[email protected]

Does anyone has an idea how to adapt the workaround correctly?

haugero avatar Jun 07 '17 08:06 haugero

It seems that this is still an issue ? Anyone an update ?

Yamakasi avatar Nov 15 '18 10:11 Yamakasi

It seems that this is still an issue ? Anyone an update ?

A Pr is very welcome. I am not proficient in Typings (regarding @types).

DanielRuf avatar Nov 15 '18 10:11 DanielRuf