Hi Greg,

I'm trying to integrate the date and time picker from Pickadate.js, but 
seem to have some problems with the styling, e.g. the dates table width is 
only taking half of the widget with, and styling of the header is different 
from the expected (default) styling as experienced 
on http://amsul.ca/pickadate.js/date/. 

this is the include order in web2py_ajax.html:

response.files.insert(0,URL('static','js/jquery.js'))
response.files.insert(1,URL('static','css/calendar.css'))
response.files.insert(2,URL('static','js/calendar.js'))
response.files.insert(3,URL('static','css/pickadate/default.css'))
response.files.insert(4,URL('static','css/pickadate/default.date.css'))
response.files.insert(5,URL('static','js/pickadate/picker.js'))
response.files.insert(6,URL('static','js/pickadate/picker.date.js'))
response.files.insert(7,URL('static','js/pickadate/legacy.js'))
response.files.insert(8,URL('static','js/web2py-custom.js'))

using web2py-custom.js

...
var date_format = (typeof w2p_ajax_date_format != 'undefined') ? 
w2p_ajax_date_format : "%Y-%m-%d";
doc.on('click', "input.date", function () {date
 var tformat = $(this).data('w2p_date_format');
 var active = $(this).data('w2p_date');
 var format = (typeof tformat != 'undefined') ? tformat : date_format;
 if(active === undefined) {
 $(this).pickadate({
 firstDay: 1,
 selectYears: 4
 });
 //Calendar.setup({
 // inputField: this,
 // ifFormat: format,
 // showsTime: false,
 // fdow: 0
 //});
 $(this).data('w2p_date', 1);
 $(this).attr('autocomplete', 'off');
 $(this).trigger('click');
 }
});

...

I guess I'm missing something here, but can't figure out.

Any idea's on this?

Thanks for sharing pickadate,

Lieven

Op maandag 21 april 2014 11:19:44 UTC+2 schreef Greg Vaughan:
>
> Hi Annet...
>
> Thank you so much for the detailed reply... I have made it a point to 
> check out the styling you have done...
>
> However the issue that I have is not just with the look but also with the 
> way that the default one functions... particularly on tablets... it is 
> clunky.
>
> So I have hacked together an implementation of "Pickadate.js 
> <http://amsul.ca/pickadate.js/index.htm>" which is the sort of thing my 
> clients expect in a modern browser application.
>
> Cheers
> Greg
>
>
> On Sunday, 20 April 2014 16:36:25 UTC+10, Annet wrote:
>>
>> Hi Greg,
>>
>> I use a customized version of jQuery UI (I only needed the datepicker and 
>> autocomplete)...
>>
>> ...
>>
>> Kind regards,
>>
>> Annet
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to