anchor.diff:              (htm
                (str (day-or-date-selector)) ))))))))
   
  -(defun enter-event-details (&key error date time location title restrictedp (identity-selection *userid*) groups-selected details existing-url recurring frequency interval days-of-week by-day-or-date weeks-of-month end-date local-day-of-week)
  +(defun enter-event-details (&key error date time location title restrictedp (identity-selection *userid*) groups-selected details existing-url recurring frequency interval days-of-week by-day-or-date weeks-of-month end-date local-day-of-week editing-schedule)
     (standard-page
       (if existing-url "Edit your event details" "Create a new event")
       (html
  
positive.code:          (when (and existing-url groups-selected)
             (dolist (group groups-selected)
               (htm (:input :type "hidden" :name "groups-selected" :value group))))
           (:input :type "hidden"
                   :name "prior-identity"
                   :value identity-selection)
           (:div
             (:label "When (date & time)")
             (:input :type "text"
                     :name "date"
                     :placeholder "mm/dd/yyyy"
                     :value date)
             (:br)
             (:input :type "text"
                     :name "time"
                     :placeholder "Add a time? (ex. 2:30 PM)"
                     :value time))
  
           (:div
             (:input :type "checkbox"
                     :name "recurring"
                     :checked (when recurring "checked")
                     :onclick "this.form.submit()"
                     "Repeat..."))
  
           (when recurring
             (let ((frequent (or (not interval) (= interval 1)))
                   (monthly (equalp frequency "monthly"))
                   (local-day-of-week (string-capitalize local-day-of-week)))
               (htm
                 (:div :class "recurring-event-details"
                   (:div
                     (:label "Repeat "
                             (when (and local-day-of-week
                                        (nor monthly frequent))
                               (htm " on " (str local-day-of-week)))
                             " every")
                     (str (number-selection-html "interval" 12
                                                 :selected (or interval 1)
                                                 :auto-submit t)))
  
                   (:div
                     (:select :onchange "this.form.submit()"
                              :name "frequency"
                       (:option :value "weekly"
                                :selected (unless monthly "")
                                "Week"
                                (unless frequent (htm "s")))
                       (:option :value "monthly"
                                :selected (when monthly "")
                                "Month"
                                (unless frequent (htm "s")))))
  
                   (when (and (or (not frequency) (not monthly))
                              frequent)
                     (htm
                       (:div
                         (:label "Repeat on")
                           (dolist (day +day-names+)
                             (htm
                               (:input :type "checkbox"
                                       :name "days-of-week"
                                       :checked (when (or (find day
                                                                days-of-week
                                                                :test #'equalp)
                                                          (equalp local-day-of-week
                                                                  day))
                                                  "checked")
                                       :value (string-downcase day)
                                       (str (elt day 0))))))))
  
                   (when (and date monthly)
                     (str (enter-monthly-recurring-details date
                                                           frequent
                                                           by-day-or-date
                                                           local-day-of-week
                                                           weeks-of-month)))
  
                   (:div
                     (:label "End Date (optional)")
                     (:input :type "text"
                             :name "end-date"
                             :placeholder "mm/dd/yyyy"
                             :value end-date))))))
  
           (:div :class "long"
             (:label "Event title")
  
negative.code:                 ((and recurring (not date)
                   (try-again "Please enter a date." t)))
  
                  ((and recurring (not time)
                   (try-again "Please enter a time" t)))
  
                  ((nor (post-parameter "confirm-location")
                        (post-parameter "submit-edits"))
                   (try-again))
  