diff --git a/code/editor/EditableDateField.php b/code/editor/EditableDateField.php index 4fd0060..883d15b 100755 --- a/code/editor/EditableDateField.php +++ b/code/editor/EditableDateField.php @@ -4,6 +4,9 @@ * * Allows a user to add a date field to the Field Editor * + * @todo Localization, Time Field / Date time field combinations. Set ranges of dates, + * set default date + * * @package userforms */ @@ -30,7 +33,23 @@ class EditableDateField extends EditableFormField { * breaks on the front end. */ public function getFormField() { - return new TextField( $this->Name, $this->Title, $this->Default); + // scripts for jquery date picker + Requirements::javascript(THIRDPARTY_DIR .'/jquery-ui/jquery.ui.core.js'); + Requirements::javascript(THIRDPARTY_DIR .'/jquery-ui/jquery.ui.datepicker.js'); + + Requirements::customScript(<<Name, $this->Title, $this->Default); } /** diff --git a/javascript/UserForm.js b/javascript/UserForm.js index 4484f93..9945473 100644 --- a/javascript/UserForm.js +++ b/javascript/UserForm.js @@ -2,9 +2,6 @@ * Javascript required to power the user defined forms. * * Rewritten and refactored from the prototype version FieldEditor. - * - * @todo Upgrade to jQuery 1.3 so we can use live rather - * then live */ (function($) { $(document).ready(function() { @@ -69,6 +66,7 @@ }); return false; }); + /** * Upon renaming a field we should go through and rename all the * fields in the select fields to use this new field title. We can @@ -239,6 +237,7 @@ valueInput.addClass("hidden"); } }); + /** * Delete a custom rule */ @@ -247,6 +246,7 @@ return false; }); + /** * Adding a custom rule to a given form */