I am using drupal 6, im my form I put the date field as
$form['myform']['from_date'] = array(
'#type' => 'textfield',
'#title' => t('From date'),
'#size' => 8,
'#default_value' => (arg(5) == null)? '0':arg(5),
'#attributes' => array('onclick' => 'GetdatePicker(this);'),
);
i want that user can not edit this field without using date popup(populated from date picker). any suggestion.