title: Canceling issue for date picker dialog in Android 4.0 using titanium
body: <p>This is the code to show date picker dialog.</p>
  
  <pre><code>        var tempDate = new Date();
          // This picker only supports android platform
          var picker = Ti.UI.createPicker({
              type : Ti.UI.PICKER_TYPE_DATE,
              minDate : new Date((tempDate.getFullYear() - 10), 0, 1),
              maxDate : new Date((tempDate.getFullYear() + 10), 11, 31),
          });
  
          picker.showDatePickerDialog({
              value : new Date(tempDate.getFullYear(), tempDate.getMonth(), tempDate.getDate()),
              callback : function(e) {
                  if (e.cancel) { // User clicks on cancel button
                      Ti.API.info('User canceled dialog');
                      alert("User canceled date");
                  } else { // User selects set or done button.
                      Ti.API.info('User selected date: ' + e.value.getFullYear());
                      alert("user selected date:"+e.value.getFullYear());
                  }
  
              }
          });
  </code></pre>
  
  <p>Everything is working well and fine up to android v2.3.6. Up to 2.3.6 date picker dialog is showing both set and cancel buttons. So when ever user clicks on set button then</p>
  
  <pre><code>        alert("user selected date:"+e.value.getFullYear());
  </code></pre>
  
  <p>this alert dialog is executing.
  If user clicks on cancel button</p>
  
  <pre><code>        alert("User canceled date");
  </code></pre>
  
  <p>this alert is executing.</p>
  
  <p>But the problem is from Android v4.0. Date picker dialog is only showing done button. If user clicks on done button then</p>
  
  <pre><code>        alert("user selected date:"+e.value.getFullYear());
  </code></pre>
  
  <p>alert is executing perfectly.</p>
  
  <p>If user wants to cancel the dialog then either he needs to press back button or click on out side of date picker view. This means user canceling the dialog even though</p>
  
  <pre><code>       alert("user selected date:"+e.value.getFullYear());
  </code></pre>
  
  <p>the same selected alert box is executing. How to solve this problem.</p>