disable date field (only update with datepicker)
Add 'readonly' => 'readonly' attribute to your field, 

ie: 

$form['myform']['from_date'] = array(
'#type' =&gt; 'textfield',     
'#title' =&gt; t('From date'),       
'#size' =&gt; 8,
'#default_value' =&gt; (arg(5) == null)? '0':arg(5),  
'#attributes' =&gt; array('onclick' =&gt; 'GetdatePicker(this);', 'readonly' =&gt; 'readonly'),
);