Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

New Post: SPUpdateMultipleListItems dynamic query and value?

$
0
0

You're retrieving the date value from a text field on the form in the format "m/d/yyyy."  That date value, as presented, is not in the format required for writing back into a SharePoint list.  You have to write dates to SharePoint in the ISO 8601 format  such as "yyyy-mm-ddTh:mm:ss-00:00."  There is a function in the thread at http://spservices.codeplex.com/discussions/349356 that will convert a JavaScript date object to the format you need.  Of course, it requires a JavaScript date object to start.  To convert your existing variable to a JavaScript Date object, you can use...

var dateComp = new Date($('h3:contains("Date Completed")').closest('td').next('td').text());
...Then pass 'dateComp' to the ISO date conversion function. The return from that function should be what you need to write to your list.

Geoff

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>