我想在表单上实现一个开始和结束日期,但也允许用户在下拉菜单中从一堆预设日期范围中选择。如果用户从下拉列表中选择一个值,则会填充开始日期和结束日期字段。如果用户编辑其中一个字段,则下拉框将自己设置为"自定义"选择。
我的"幼稚"实现如下,但很明显,无论字段是否由用户或控制器更改,所有的手表都将触发。我怎样设置我的手表才能使它工作呢?
我想在表单上实现一个开始和结束日期,但也允许用户在下拉菜单中从一堆预设日期范围中选择。如果用户从下拉列表中选择一个值,则会填充开始日期和结束日期字段。如果用户编辑其中一个字段,则下拉框将自己设置为"自定义"选择。
我的"幼稚"实现如下,但很明显,无论字段是否由用户或控制器更改,所有的手表都将触发。我怎样设置我的手表才能使它工作呢?