Re: UK Date format for datepicker in Google Libraries?

100 views
Skip to first unread message

Jeremy Geerdes

unread,
Feb 18, 2013, 11:19:26 AM2/18/13
to google-ajax...@googlegroups.com
I don't know of any library in the CDN which will accomplish this. And this group isn't really for supporting JQuery UI or any of the other libraries, specifically. Given that pretty much everyone outside of the US - and even some in the US - formats dates dd/mm/yyyy, this should be something they would be willing to support, if they don't already. If I was in your shoes, I would use their support channels to ask the question and/or offer the suggestion.

jg

On Sun, Feb 17, 2013 at 6:39 PM, TDPsGM <tdpmark...@gmail.com> wrote:
I am running a Customer management and follow up system called Infusionsoft.

I can create secure webforms (https connections) for my clients to use that are hosted by that company.

They have form "Builder" that lets you drag and drop elements onto the form.

One of the elements is an "HTML" element that will let you insert code.

I am trying to implement a "Date Picker" for a date field that is on the form.

I found that I could use this code to get the Calendar to appear:

<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js" type="text/javascript"></script>
<script type="text/javascript">jQuery('#inf_custom_xxxxxxxxxxxxxxxxxx').datepicker();</script>

. . . with one exception.  It formats the date like this: mm/dd/yy

I need it to display and submit the selection in this format: dd/mm/yy

I was looking here:  http://api.jqueryui.com/datepicker/#option-dateFormat
. . . but I really am not sure how to integrate that into the above code.

Can someone assist with this, OR, is there an option or reference within the Google Libraries that I can use that will cover this need?
How do I search for it as I am having no luck finding it.

Thanks for the assistance.

--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit
https://groups.google.com/d/msg/google-ajax-search-api/-/QMcfn_GMXBcJ
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!
Message has been deleted

TDPsGM

unread,
Feb 18, 2013, 2:58:47 PM2/18/13
to google-ajax...@googlegroups.com

Thanks for the reply Jeremy.
I thought maybe I was in the right place as the scripts were referencing a

" ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js "

. . . library.  Maybe I am reading that wrong.

Is there an index that will let one look at what the options are IN that library?
I am obviously new to this and Google Groups, and the jQuery UI Group appears to have been shut down and moved.

Thanks for the response.  Any other comment would be greatly appreciated.

Jeremy Geerdes

unread,
Feb 18, 2013, 3:20:38 PM2/18/13
to google-ajax...@googlegroups.com
The reference is correct: Google operates a CDN which hosts extremely popular libraries such as JQuery, JQuery UI, Mootools, etc. Here is the list of libraries hosted in the CDN:


But the libraries' individual creators are actually responsible for their own maintenance and support. Here is a link to JQuery UI's support page:


jg


To view this message on the web, visit
https://groups.google.com/d/msg/google-ajax-search-api/-/QMcfn_GMXBcJ
For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-search-api+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Jeremy R. Geerdes
Generally Cool Guy
Des Moines, IA

If you're in the Des Moines, IA, area, check out Debra Heights Wesleyan Church!

--
--
You received this message because you are subscribed to the Google
Groups "Google AJAX APIs" group.
To post to this group, send email to
google-ajax...@googlegroups.com
To unsubscribe from this group, send email to
google-ajax-searc...@googlegroups.com
To view this message on the web, visit

For more options, visit this group at
http://groups.google.com/group/google-ajax-search-api?hl=en?hl=en
 
---
You received this message because you are subscribed to the Google Groups "Google AJAX APIs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-ajax-searc...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

TDPsGM

unread,
Feb 18, 2013, 7:09:10 PM2/18/13
to google-ajax...@googlegroups.com
That's awesome Jeremy.  Thanks.

I found that libraries link earlier but I wasn't really that sure what it was I was looking at til now.

The one thing that was throwing me was that on the support site they were using:

<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
instead of:
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

There was really no reference to WHERE they were in the Google Libraries. Any how I got it figured now.

In case anyone stumbles upon this by accident the solution was very simple as it usually is.

All I had to do was add was this to the datepicker brackets:  {dateFormat: 'dd-mm-yy'}

So it went from this:


        <link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/base/jquery-ui.css" />
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js" type="text/javascript"></script>
        <script type="text/javascript"> jQuery('#XXXXXXX').datepicker(); </script>

to this:


        <link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/themes/base/jquery-ui.css" />
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js" type="text/javascript"></script>
        <script type="text/javascript"> jQuery('#XXXXXXX').datepicker({dateFormat: 'dd-mm-yy'}); </script>

Lastly I went to the most up to date scripts and found a more flexible option for the calendar (which lets you pick the Months & years) and the final code I used was:

        <link rel="stylesheet" type="text/css" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/themes/base/jquery-ui.css" />
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
        <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.1/jquery-ui.min.js" type="text/javascript"></script>
        <script type="text/javascript">jQuery('#XXXXXXX').datepicker({changeMonth: true, changeYear: true, dateFormat: 'dd-mm-yy'});</script>

Where
XXXXXXX is your fields id=  value.

Hope this helps someone, and thanks again Jeremy!


Reply all
Reply to author
Forward
0 new messages