close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Strange Date Format Question

Thread began 9/05/2014 10:18 am by sfranzken73972 | Last modified 9/05/2014 12:04 pm by sfranzken73972 | 2567 views | 8 replies |

sfranzken73972

Strange Date Format Question

Hi,

I am trying to use datepicker to insert into MySQL database table into a date field

I changed this format in the code:

<script type="text/javascript">
$(function(){
$('#datepicker_1').datepicker({
dateFormat: 'yyyy/mm/dd',
showAnim: 'show',
onClose: closeDatePicker_datepicker_1
});
});
function closeDatePicker_datepicker_1() {
var tElm = $('#datepicker_1');
if (typeof datepicker_1_Spry != null && typeof datepicker_1_Spry != "undefined" && date_Spry.validate) {
datepicker_1_Spry.validate();
}
tElm.blur();
}
</script>

However, when it does not insert but when you select a date from the calendar, it shows up still in mm/dd/yyyy format even though in the code its changed; please advise?

Sign in to reply to this post

Jason ByrnesWebAssist

1) That is an invalid date format. in the date picker API:

yy stands for a 4 digit year format. y stands for a 2 digit date formation

use:
dateFormat: 'yy-mm-dd',

2) changes to javascript may not be seen right away till you clear the browsers cache.

Sign in to reply to this post

sfranzken73972

Reply

Ok I changed the date format and ran CCleaner to clear cache but still not working correctly.

When I go to update a record the date is still showing as 0000-00-00

And when I select a date from the calendar it shows as 09/05/2014

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

sfranzken73972

Reply

Ok sent

Sign in to reply to this post

Jason ByrnesWebAssist

viewing the source code for page shows the old date format.


it doesn't look like your changes are being uploaded to the server properly.

Sign in to reply to this post

sfranzken73972

Thanks

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

sfranzken73972

thanks

I think I got it thanks

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...