Commit c46108e3 authored by Gaurav Kapoor's avatar Gaurav Kapoor Committed by Gaurav Kapoor
Browse files

Issue #3262470 by gaurav.kapoor: Improve internal documentation, description...

Issue #3262470 by gaurav.kapoor: Improve internal documentation, description and naming conventions used in the module.
parent e2686d36
Loading
Loading
Loading
Loading
+1 −29
Original line number Diff line number Diff line
Pikaday Calendar
****************

Add the JavaScript to the end of your document:

<script src="pikaday.js"></script>
<script>
    var picker = new Pikaday({ field: document.getElementById('datepicker') });
</script>

If you're using jQuery make sure to pass only the first element:

var picker = new Pikaday({ field: $('#datepicker')[0] });

If the Pikaday instance is not bound to a field you can append the element
anywhere:

var field = document.getElementById('datepicker');
var picker = new Pikaday({
    onSelect: function(date) {
        field.value = picker.toString();
    }
});
field.parentNode.insertBefore(picker.el, field.nextSibling);

Browser Compatibility
*********************
	•     IE 7+
	•     Chrome 8+
	•     Firefox 3.5+
	•     Safari 3+
	•     Opera 10.6+
TBA
+2 −2
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ class PikadaySettingsForm extends ConfigFormBase {
   * {@inheritdoc}
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    // Retrieve and the configuration.
    // Retrieve and save the configuration.
    $this->configFactory->getEditable('pikaday.settings')
      ->set('pikaday_enable', $form_state->getValue('pikaday_enable'))
      ->set('pikaday_formids', $form_state->getValue('pikaday_formids'))
+9 −9

File changed.

Contains only whitespace changes.