Jump to content
  • 0

Caspio Date Picker V Html5 Date Picker


Question

4 answers to this question

Recommended Posts

  • 0

Hi Aurora,

 

Thanks, I checked the localization, it looks alright but it still not behaving correctly.

 

I removed the date picker and turned the form field into a standard text field so I could see what's happening, it seems there is an additional issue.

 

For example:

 

On the web page I'm forced to enter the date as 29/05/2015

 

When I read the date back to the page it is 05/29/2015

 

When you look in the table it is 05/29/2015

 

Caspio localization is set to English UK with default settings.

 

Thanks

Link to post
Share on other sites
  • 0

Here's a workaround to flip the mm/dd/yyyy format (displayed) to dd/mm/yyyy

 

pasted into the footer:

<script>
function ukDateFormat (DateTxt) {
    DateVar = DateTxt;
    var DateVar = new Date(DateVar);
    var dd = DateVar.getDate();
    var mm = DateVar.getMonth()+1; 
    var yyyy = DateVar.getFullYear();
    if(dd<10){
        dd='0'+dd
    } 
    if(mm<10){
        mm='0'+mm
    } 
    var DateVar = dd+'/'+mm+'/'+yyyy;
    document.getElementById("MY_INPUT_DATE_FIELD_ID").value = DateVar;
}
ukDateFormat ('[@field:MY_CASPIO_DATE_FIELD]')
</script>

I will have another look to see if it fixes the date picker issue.

Link to post
Share on other sites
  • 0

The the resulting date from the above script displays perfectly in Chrome. 

 

However in Explorer we get NaN/NaN/NaN despite all attempts to force the date to a text string,

 

( NaN = Not A Number)

 

Is it possible to make the date to display correctly in Explorer?

 

Thanks

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...