title: Save date from Xamarin Forms DatePicker to Parse date field
body: <p>I am following this tutorial: <a href="http://iosapi.xamarin.com/?link=T%3aXamarin.Forms.DatePicker" rel="nofollow">http://iosapi.xamarin.com/?link=T%3aXamarin.Forms.DatePicker</a> and cannot seem to figure out how to get the returned value (date) and save it to a Parse date field.</p>
  
  <p>The error message I get with the code below is "Argument is out of range. Parameter name: index"</p>
  
  <p>I appreciate your feedback/guidance</p>
  
  <p><strong>Create DatePicker</strong></p>
  
  <pre><code>        DatePicker birthDate = new DatePicker
          {
              Format = "D"
          };
  </code></pre>
  
  <p>Save to Parse</p>
  
  <pre><code>        btnSubmit.Clicked += async (sender, ea) =&gt; {
              try
              {
                  Legacy legacy = new Legacy();
                  legacy["firstName"] = firstName.Text;
                  legacy["birthdate"] = birthDate;
  
                  await legacy.SaveAsync();
  
              }
              catch (Exception e)
              {
                  // Signup failed, show alert
                  await DisplayAlert ("Please Try Again!", e.Message, "OK");
              }
  
          };
  </code></pre>