Datepicker issue

Datepicker issue

  
Hi,

im using the datepicker component downloaded from the community. its working fine in the normal window, but when i try to implement it to a popup window, it doesnt work.

I try to inspect element , and in the console view the error:
TypeError: osjs.datepicker is undefined

is there a limitation in using the datepicker?

Thanks,
Ron
Hi Ron,

From what i can see your problem is no the datapicker but the javascript that it uses.
Look in the compote you download there must some javascript, and when you pass it to the widget you didn't pass the JS that why you get that error.

That's my 2 cents.

thanks,
Tiago
Hi Tiago,

yes i agree that its the javascript , i already saw the javascript defined within the webblock, but i thought since the javascript is define as a property of the web block, it should be carried whenever i drag a webblock from any page in the application. right? and also, when i try to debug, the javascript is there.

thanks,
ron
Hi Ron,

In teory you are right, it should carrie it and everthing should work, but that's not the case.
So can you share the e-space or at least a info free version so that we can studie it?

Thanks,
Tiago
Is your weeknumber (if you opted to show weeknumbers) in the datepicker also 1 week off ?
Hi Tiago,

I've attach a sample e-space as an example. not sure how i can remove the ipp on this one, i hope it works on your side.

Hi Marcel,

the date picker that im using is from the community datepicker i just downloade, and it works fine.

if you're using the richwidget datepicker, i think i happen to encounter that error. but not on the week, on the date, its off by one day. If your still using an old version of the platform (7.0) you just need to update the server version to the latest and it will be resolved. or upgrade it to version 8.0.

Thanks,
Ron

Not quite, since I am running an the latest and greatest version of the platform (8.0) already, and the weeknumber is still 1 week off. It is acknowledged by another user as well. I will write a bug report to OS-Support later today. I alsno noted, that there is no WEEK() function as well, although there are functions for MONTH, YEAR, DAY. No week. Strange.
Hi,

@Marcel
I guess that now you are talking about the built-in functions. You have one that does that DayOfWeek(), it receives a date and will return an integer 0(sunday) to 6(saturday).
Hi Nuno, yes I know. Normally however, one would expect the function WEEK(date) to return the number of the week in a year. Like: WEEK(26-09-2013) returns the integer: 39.
There is such a function for MONTH, but not for WEEK.
Oh that, sorry!
Probably you need to make it yourself, and make a sugest in the ideas to include that function. I was looking for a component in the forge, Essentials, and that one is not provided also.
OK. I am not sure an addition to the ideas area will help, since I found one in the ideas list dated back to 2011 already. So it has been added before there. Apparantly, the list of priorities does not allow this having attention yet.
Hi Ron,

Your problem with the popups is because some components assume (and they shouldn't) that jqueryui is always loaded in the pages.
This is usually true in 7.0 (won't be true on 8.0+ in most cases, read this for 8.0+) because some RichWidgets cause jqueryui to load on 'osjs' as side effect. This is why the component works in your main page (it has Popup_Editor and Feedback_Message widgets for example).

The best way (and future proof) to fix it would be to include your own jquery and jqueryui on your pages (there are components in the forge like jQuery Goodies that have blocks for that) and rename all uses of 'osjs' to 'jQuery'.


Regards,
João Rosado