#25006: Allow for custom Time shortcut in DateTimeShortCuts.js
-------------------------------+--------------------------------------
     Reporter:  RamezIssac     |                    Owner:  nobody
         Type:  New feature    |                   Status:  new
    Component:  contrib.admin  |                  Version:  1.8
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by RamezIssac):

 I'm with you that it's not a big a deal, and hacks do exsits
 However, enhancing this might not be that hard, and most probably it's
 gonna stay with us when the html5 comes too.

 What do you think about this way...

 We add a new default in the DateTimeShortCut var, it use would look like
 this
 {{{

 DateTimeShortcuts['defaultTimes'] = {
     'all':[{ name : '8PM', hours:20} ,{ name : '10 PM', hours:22}],
     //special id, can make it _all_ to be get fancy
     //the default for all time fields , If not present we fall back to the
 django default
     'id_pub_date':[{ name : '11AM', hours:11} ,{ name : '11PM',
 hours:23}],
     'id_release_date':function(inp){
         //Go Nuts ! :-)
     }
 };
 }}}
 ?

 Kind Regards;

--
Ticket URL: <https://code.djangoproject.com/ticket/25006#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/068.5c798e6d3a03027933e0956ec784a799%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to