In an Application where the Calendar is used in the frontend, I replace Data via Ajax.
This requires inizialisation of the calendar in js.
It works fine in 3.6, but not in 3.7 because the name and params have changed.
Category | ⇒ | JavaScript |
https://gist.github.com/chmst/a825bf5edb86b04de6b865e7a112f680 hope you can see this.
Labels |
Added:
?
|
Nope
@chmst can you provide some more info here?
like do you initiate the calendar with JHtml?
What options are you using?
One simple way to force initialising the calendar on the success of your javascript is to
.field-unused-calendar
JoomlaCalendar.init(".field-unused-calendar");
Or you can replicate what @Fedik is doing for the subforms: https://github.com/joomla/joomla-cms/blob/staging/media/system/js/fields/calendar.js#L1127-L1129
Joomla doesn't have control over the javascript events so we need to improvise here :(
@wilsonge I don't see we can do something more here
The 3.6.5 code does not work in 3.7 anymore
@bembelimen the calendar initialises itself on the event 'DOMContentLoaded', @chmst 's code will not work as there's no setup function anymore...
as I said, the first input field is initialized, but the second have to be initialized manually, because it's injected after dom loaded
Status | New | ⇒ | Discussion |
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-04-23 12:49:00 |
Closed_By | ⇒ | zero-24 |
Labels |
Removed:
?
|
@dgt41 can you take a look here?