That component is
implemented as a rather beautiful JavaScript-powered pop-up dialogue, and it can
be very convenient and efficient in many cases.
However, there can be several reasons why we might want to have an alternative
to DatePicker, one of them being the taste of our customers who, at least in my
experience, often prefer to have a more traditional-looking control for date input.
The natural alternative solution might look like three Select components??”for days,
months and years, working together as one unit. This is exactly the component we
are going to create in the next sections.
Creating Custom Components
[ 212 ]
This is what it is going to look like:
The size limit of this book does not allow us to fully develop the Celebrity Collector
application, but we are going to prepare enough components for you to continue the
work. For now, we are simply going to place such a component on one of the pages
and make sure it works as we wish.
Before creating the component itself, we need to prepare the ground. To be able to
select a day and a year, we are going to need a Select component that works with
integers, which means that we need to create a SelectModel and accompanying
classes that know how to deal with integers.
Pages:
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267