better calendar.js?

308 views
Skip to first unread message

VP

unread,
Jul 11, 2013, 12:51:34 PM7/11/13
to web...@googlegroups.com
The current calendar.js is fine for date picker, but for datetime picker it is not so good; select a specific time is a headache.


I wanted to swap out but that doesn't seem to be easy.  Any idea?

Thanks,

VP
Message has been deleted

Massimo Di Pierro

unread,
Jul 11, 2013, 1:11:28 PM7/11/13
to web...@googlegroups.com
The requirement is to have a calendar that does not depend on other JS (apart for jQuery) and CSS and supports both date and datetime.
Does the calendar you propose meet these specs?

VP

unread,
Jul 11, 2013, 1:19:59 PM7/11/13
to
Massimo:

I just came across it, so I don't know 100% for sure.  But I think it only depends on bootstrap which is included in web2py.

Massimo Di Pierro

unread,
Jul 11, 2013, 2:03:09 PM7/11/13
to web...@googlegroups.com
But we do not want the popup to break when people replace bootstrap with a different style.

Jim S

unread,
Jul 11, 2013, 3:26:15 PM7/11/13
to web...@googlegroups.com
I agree it is nicer and easier to use than the current date/time popup.  Yes, it does support time.  Is there a way it could be an optional feature you could turn on if you're using bootstrap?

-Jim

LightDot

unread,
Jul 16, 2013, 5:01:41 PM7/16/13
to web...@googlegroups.com
Looks nice. Probably worth looking into this...

Regards,
Ales

Massimo Di Pierro

unread,
Jul 17, 2013, 5:15:57 AM7/17/13
to web...@googlegroups.com
Does anybody wants to attempt a replacement of the current calendar.js? We will have to check it works without bootstrap css.

Niphlod

unread,
Jul 17, 2013, 11:31:03 AM7/17/13
to web...@googlegroups.com
and all the customizations, such as the time, date and datetime accepted formats.

Annet

unread,
Jul 17, 2013, 2:28:14 PM7/17/13
to web...@googlegroups.com
I had a look at the datetime picker, I miss the month and year menus and the week of the year. Furthermore I find the
display of dates in other months distracting, the styling could be a bit more calendar like.


Kind regards,

Annet.

Jim S

unread,
Jul 18, 2013, 1:32:47 PM7/18/13
to web...@googlegroups.com
My main complaint with the current datetime picker is that you can get in situations where (in Firefox at least) you can have a dropdown of previous entries appear over the calendar itself.  See attached screen shot.

-Jim
Screenshot_1.png

Willoughby

unread,
Jul 18, 2013, 3:30:58 PM7/18/13
to web...@googlegroups.com
I believe you can override that (it's a browser feature) with HTML5:

Jim S

unread,
Jul 18, 2013, 3:46:46 PM7/18/13
to web...@googlegroups.com
I have no idea what version my calendar.js is.  Is that something that can just be overwritten whenever you do an update of web2py?

Also, has this been addressed in more recent versions of web2py?

-Jim

Paolo Caruccio

unread,
Jul 18, 2013, 4:03:50 PM7/18/13
to web...@googlegroups.com

Jim Steil

unread,
Jul 18, 2013, 4:16:34 PM7/18/13
to web...@googlegroups.com
that may work for 1 browser but I can't require that all users of the app turn off auto-complete.


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/5NfsFtnv8Ww/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Paolo Caruccio

unread,
Jul 18, 2013, 5:24:23 PM7/18/13
to web...@googlegroups.com
Well, the automplete is a <form> | <input> attribute and therefore you could set in HTML code

<form name="form1" id="form1" method="post" autocomplete="off"  action=""> ... </form>

or

<input type="text" name="myfield" autocomplete="off">

w3c documentation:

for the form

Jim Steil

unread,
Jul 18, 2013, 5:42:21 PM7/18/13
to web...@googlegroups.com
So it should be an update to the widget, right?

-Jim

LightDot

unread,
Jul 18, 2013, 5:48:32 PM7/18/13
to web...@googlegroups.com
On Wednesday, July 17, 2013 8:28:14 PM UTC+2, Annet wrote:
I had a look at the datetime picker, I miss the month and year menus and the week of the year.

Month and year menus appear if you click on the "mmm YYYY" ("Julho 2013" as it shows in the first demo example). First click shows months, second shows years.

Regards,
Ales
 

Paolo Caruccio

unread,
Jul 18, 2013, 6:11:19 PM7/18/13
to web...@googlegroups.com
I don't think so but you could set the autocomplete attribute of date inputs in your form to off by adding in the related controller:

    inp_dates = form.elements('input', _class='date')
   
for inp_date in inp_dates:
        inp_date
['_autocomplete'] = 'off'

Annet

unread,
Jul 19, 2013, 2:59:36 AM7/19/13
to web...@googlegroups.com
Hi Ales,


Month and year menus appear if you click on the "mmm YYYY" ("Julho 2013" as it shows in the first demo example). First click shows months, second shows years.

I am not sure the visitors of my site will be able to figure that out.

Furthermore, it's probably me but, when I click on mmm YYYY once and select the month, I get the full calendar again with the selected month, then I click on mmm YYYY twice to select the year, after that I have to reselect the month to get back to the full calendar, is that correct?


Regards,

Annet.

Massimo Di Pierro

unread,
Jul 19, 2013, 4:40:44 AM7/19/13
to web...@googlegroups.com
How about we put this in web2py,js?

jQuery('input.date,input.datetime,input.time').attr('autocomplete','off')

Massimo

LightDot

unread,
Jul 19, 2013, 6:10:33 AM7/19/13
to web...@googlegroups.com

On Friday, July 19, 2013 8:59:36 AM UTC+2, Annet wrote:
Hi Ales,

Month and year menus appear if you click on the "mmm YYYY" ("Julho 2013" as it shows in the first demo example). First click shows months, second shows years.

I am not sure the visitors of my site will be able to figure that out.

I'm afraid I can only offer anecdotal data for now - it was the first thing I clicked when wanting to change the year. Don't know how much trouble this would be for the users, it was so natural to me that I didn't even consider it as a problem.
 
Furthermore, it's probably me but, when I click on mmm YYYY once and select the month, I get the full calendar again with the selected month, then I click on mmm YYYY twice to select the year, after that I have to reselect the month to get back to the full calendar, is that correct?

I just click twice to begin with if I want to change both the year and the month. Again, first choosing the right year seems logical to me...

Thinking back, I got all this when first trying out the calendar. Everything worked for me, on the first shot. If I was just using the calendar on some very important site, perhaps I would perceive this differently. It's something to consider...

I usually (a)buse some of my less computer savvy friends to do such tests... :) ...which I'll do when I first get the chance. This being said, did anyone else spot usability problems?
 
Regards,

Annet.

Regards,
Ales

Paolo Caruccio

unread,
Jul 19, 2013, 9:13:25 AM7/19/13
to web...@googlegroups.com
We could also change web2py.js

Attached the file modified.
web2py.js

Paolo Caruccio

unread,
Jul 19, 2013, 9:31:47 AM7/19/13
to web...@googlegroups.com
Anyway, we could take in consideration the button alternative that, in my opinion, is more flexible. I mean that the calendar popup should be shown when the user clicks a button near the control and not when the control is focused. In this way the autocomplete browser feature (that, in some scenarios, could be useful) will be preserved and, from a developer point of view, it's simpler remove a button or change its onclick action when he/she want use an other calendar or even use the html5 calendar feature.

Jim Steil

unread,
Jul 19, 2013, 10:17:20 AM7/19/13
to web...@googlegroups.com
Massimo - That would be great!
Reply all
Reply to author
Forward
0 new messages