views:

313

answers:

2

i have been playing around with the ext js library for showing multi month calendar

http://www.lubber.de/extjs/datepickerplus/

one issue is in all the examples are either coming off of another control(combo, textbox) or inside a window object

does anyone know if there are any examples of simply displaying the calendars on a regular page?

+1  A: 

If you check the source of http://www.lubber.de/extjs/datepickerplus/ around line 635 where the dWin object is being instantiated you should get an idea on how to add it to a page.

Basically this script (be warned, it has loads of commented code and actually is quite a mess) creates an Ext Window, with several items of which one has a datepickerplus xtype.

It should be possible to also render the datepicker to another dom element directly but i think that this extension to Ext doesn't support this out of the box so you should probably extend the object and override the render method.

Hope that helps

ChrisR
A: 

I've been searching for an answer to this already. The example suggested above with regards to the dWin, still only provides a lazy render example (using xtype). Sadly nowhere is there an example of something like var # = new DatePickerPlus.I have tried the abysmal ExtJs forums (not a good place to get any coherent answers at all). Sadly there is no standard for ux plugin makers to provide a comprehensive API for there plugins (though there indeed should be). Most of the time they whack out what looks like a fairly good plugin, show some working demos, but expect the rest of us to figure it all out from the mess of source code they use, its very frustrating, and time consuming.

In my particular example, I wish to dynamically render a datepickerplus, based on some parameters for some of the properties fields. I do this by creating a variable to hold the datepicker object and assigning it a new datepicker with the parameters. I then try to add it to a panel with #panel.add(#datepicker), but if apparently wont work like that. However there is no guidance on this way (construction via a proper constructor methodology) only lazy rendering with xtype. So any soul here on stackoverflow I would be happy for some help!

Steve