Executive function (EF) is a central aspect of cognition that undergoes significant changes in early childhood. Changes in EF in early childhood are robustly predictive of academic achievement and general quality of life measures later in adulthood. We present a dynamic neural field (DNF) model that provides a process-based account of behavior and developmental change in a key task used to probe the early development of executive function--the Dimensional Change Card Sort (DCCS) task. In the DCCS, children must flexibly switch from sorting cards either by shape or color to sorting by the other dimension. Typically, 3-year-olds, but not 5-year-olds, lack the flexibility to do so and perseverate on the first set of rules when instructed to switch. Using the DNF model, we demonstrate how rule-use and behavioral flexibility come about through a form of dimensional attention. Further, developmental change is captured by increasing the robustness and precision of dimensional attention. Note that although this enables the model to effectively switch tasks, the dimensional attention system does not "know" the details of task-specific performance. Rather, correct performance emerges as a property of system-wide interactions. We show how this captures children's behavior in quantitative detail across 14 versions of the DCCS task. Moreover, we successfully test a set of novel predictions with 3-year-old children from a version of the task not explained by other theories.