Previously the showcase of Aristo and Aristo2 didn't work because several bugs in the class CPDatePicker.
This PR fixes these problems :
- The first problem was when displaying a textual datePicker, the class tried to calculate different things for the calendar (good optimization as well).
- The second problem was about the calendar and the hands. It wasn't possible to display a PatternColor made with an image in a layer, now we use a PatternImage and the method CGContextDrawImage to draw the hands.
Previously, CPStepper was delcared using a @class. If CPStepper was not manually imported anywhere else in the app, it caused a crash.
This patch explicitely import CPStepper.j in _CPDatePickerTextField.j
Previously the CPDatePicker freezed when trying to hide it when it was the firstResponder.
There was an intern problem in the CPDatePickerTextField about the nextKeyView. That's why there was a boundless loop and the freeze.
This PR also fixed a big about the previous and next textField in the CPDatePicker.
It also fixed a bug about the CPDatePicker when it becomes firstResponder.
Fixes#1909
Previously the CPDatePicker didn't work with the action and target. Now each time the dateValue changed, the given action is sent to the target.
This commit fix also a bug with moving with tab and the arrows. Before, the left arrow worked liked a tab when the firstElementTextField was selected in a textual CPDatePicker.
Test app in Tests/Manual/CPDatePicker.