title: Where do I handle UI rules in Clean Architecture?
body: <p>I'm writing an Android app where users can create and view events. I'm having trouble applying the principals of Clean Architecture to my UI behaviour for the create-event form. Each event has a start date, an end date, and a description for which I have the following representation in my domain:</p>
  <pre><code>data class Event(
    val startDate: LocalDate,
    val endDate: LocalDate,
    val description: String
  )
  </code></pre>
  <p>I want my form UI to have a few rules, one of which is: if the user selects a start date that is after the currently-selected end date, then set the selected end date to be equal to the new start date.</p>
  <p>My dates are selected with Android date pickers which output the selected year, month, and day, and my dates are presented as text in TextViews.</p>
  <pre><code>fun startDateSelected(year: Int, month: Int, dayOfMonth: Int) { ... }
  </code></pre>
  <pre><code>interface IView {
    fun renderStartDate(date: String)
  }
  </code></pre>
  <h3>My Confusion</h3>
  <p>On one hand, one UI input affecting another sounds like a controller concern to me because the user hasn't submitted the form yet. On the other hand, the date pickers' behaviour exists regardless of the component I'm using to implement it, so I don't want to be forced to use the UI-like convention of year, month, and day, to perform that logic when my domain's <code>LocalDate</code> objects are much simpler to work with and don't care about the format appropriate for the UI.</p>
  <p>If the the adapters layer (controller, presenter) is reserved for translating data to and from the details, and if UI behaviour is not a domain concern, then where do I implement this logic?</p>