<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: gform_save_field_value datepicker errors</title>
		<link>https://legacy.forums.gravityhelp.com/topic/gform_save_field_value-datepicker-errors</link>
		<description>Gravity Support Forums Topic: gform_save_field_value datepicker errors</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 23:27:34 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/gform_save_field_value-datepicker-errors" rel="self" type="application/rss+xml" />

		<item>
			<title>David Peralty on "gform_save_field_value datepicker errors"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform_save_field_value-datepicker-errors#post-301331</link>
			<pubDate>Tue, 04 Jun 2013 11:00:15 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">301331@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sorry about that. All my best!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>reddishpink on "gform_save_field_value datepicker errors"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform_save_field_value-datepicker-errors#post-300947</link>
			<pubDate>Tue, 04 Jun 2013 08:06:54 +0000</pubDate>
			<dc:creator>reddishpink</dc:creator>
			<guid isPermaLink="false">300947@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Oh, okay. That's a bit frustrating since it makes the dates unsortable in the database when the date field is used.  Thanks for your reply.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "gform_save_field_value datepicker errors"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform_save_field_value-datepicker-errors#post-281426</link>
			<pubDate>Mon, 27 May 2013 19:11:59 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">281426@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;You can't just change our date field to save data in a different way than we've programmed it. &#60;/p&#62;
&#60;p&#62;If you want to do this, then your best bet is to use a regular input field, add a CSS class to it, and manually hook the JQuery datepicker script to that field. Then you can have full control over how the date is saved in the database.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>reddishpink on "gform_save_field_value datepicker errors"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/gform_save_field_value-datepicker-errors#post-281283</link>
			<pubDate>Mon, 27 May 2013 16:32:11 +0000</pubDate>
			<dc:creator>reddishpink</dc:creator>
			<guid isPermaLink="false">281283@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hello. I'm trying to use gform_save_field_value to save a date from a datepicker field (formatted d/m/Y) into iso format (Y-m-d).  My original code is:&#60;/p&#62;
&#60;p&#62;add_filter(&#34;gform_save_field_value&#34;, &#34;save_iso_date&#34;, 2, 9);&#60;br /&#62;
function save_iso_date($value, $lead, $field, $form) {&#60;br /&#62;
  list($day, $month, $year) = explode(&#34;/&#34;, $value);&#60;br /&#62;
  return sprintf('%s-%s-%s', $year, $month, $day);&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;So, for a date given in the datepicker as 06/05/2013, this adds the value in the database as '--2013-05-06' for instance.  If I replace '%s-%s-%s' with something like '%s/%s/%s' it results in '//2013-05-06'.  If I drop the first two characters like so:&#60;/p&#62;
&#60;p&#62;  return substr(sprintf('%s-%s-%s', $year, $month, $day), 2);&#60;/p&#62;
&#60;p&#62;then what's added to the db is the original string 06/05/2013.  Something weird is happening.  Am I going about this the right way?
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
