Archive for October, 2011

I've had some questions about extending flexcal so I created one that combines filtering, output formatting and drop-down menus.

The filtering will only allow dates going back 17 years, and the calendar will start on that date. The formatting will use European dates (d/m/y). The drop-down menus will be the ones from the original post, but instead of using aspect-oriented programming (flexcal('after', '_adjustHTML', function (cal){...) we will subclass the original widget.

Continue reading ‘A flexcal Example’ »

In a major burst of middle-of-the-night hacking, I've updated flexcal to better handle changing options after instantiation and added a current option, representing the currently highlighted date. I also updated textpopup with a new option, box that allows you to set the popup's container, useful for inline widgets. The flexcal API examples use it for an inline datepicker.

My flexcal plugin exposes a few useful methods, which I have not documented elsewhere. They are called, like all jQuery UI widget methods, by creating the widget: cal = $('input.date').flexcal() then invoking the method: cal.flexcal('setDate', '10/25/2011').

Continue reading ‘The flexcal API and an inline flexcal’ »

Update: I no longer (2012-08-05) use Chili, so this bug isn't relevant

Update: I haven't figured it out, but I did get a workaround. The bug is that any unmatched end of text leads to deleted characters in the middle of the text, so I added a line $.chili.recipes[recipeName]._main.endoftext = {_match: /$/}; to the downloadRecipe method, and now the bug doesn't show up.

I'm running Firefox 7.0.1 and I'm coming across a very strange bug in my syntax highlighter, chili. It doesn't show up with any other browser (and I can't try older Firefox versions, with the auto-updating). I'm still working out the details, but it's erasing all the code from a string to 2 characters from the end. Thus:
$('foo').show();

becomes

$('foo').show();
If you don't see a problem, great. If you do, switch to a different browser. Or figure out what's going on and let me know. Continue reading ‘Weird bug with chili and Firefox’ »
For those following flexcal, my jQuery UI date picker, I've just released version 1.3. It fixes a bug in the setDate routine that would cause it to fail if called before the calendar was shown, and added date filtering. See the original post (now updated) for details.