(^398) ❘ CHAPTER 16 DATEPICKER
Summary
In this chapter, you learned a little about what the jQuery UI Datepicker plugin offers. This chapter
covered only some of the options allowed because of constraints on resources; however, a compre-
hensive reference containing all the options that you can use with the datepicker() method appears
in Appendix O.In this chapter, you learned that the Datepicker plugin does not come with much styling, and what-
ever styling you want must be implemented either manually or using one of the premade jQuery
UI themes. You saw how the widget’s markup is structured and a sample style sheet that could be
applied to it.You learned that the Datepicker can limit the range of selectable dates. To limit what dates the user
can put in the date fi eld, the minDate and maxDate options can be used. To set the range of years
the Datepicker displays, the yearRange option can be used. To toggle whether the month and year
options are drop-down menus, you use the changeMonth and changeYear options.You learned a little about the options available to you for localizing the Datepicker. You can change
the date format any of the text labels, and the starting weekday displayed in the calendar.EXERCISES
- Name the two options that you can potentially use to limit the dates the user can input into
the Datepicker. - Which option sets the years populated in the year drop-down menu? What is an
example value? - Which options provide the month and year options as drop-down menus?
- Which option would you use to change the date format?
- Does the Datepicker plugin give you the ability to translate its text into Spanish? How would
you translate the weekday labels into Spanish? - Which option would you use to change the starting weekday?