Created
July 27, 2018 10:48
-
-
Save sfcure/d3b3c89f61763e6de5d2529e3b0b74de to your computer and use it in GitHub Desktop.
Jquery Datepicker in Lightning Components for better control on behaviour of Datepicker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component > | |
<ltng:require scripts="{!join(',', $Resource.jquery_2_2_4, $Resource.jquery_ui_1_12_1 + '/jquery-ui-1.12.1/jquery-ui.min.js')}" | |
afterScriptsLoaded="{!c.afterScriptsLoaded}" | |
styles="{!$Resource.jquery_ui_1_12_1 + '/jquery-ui-1.12.1/jquery-ui.min.css'}" | |
/> | |
Birth Date: <input aura:id="birthdate" class="datepicker" type="text"/> | |
</aura:component> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
afterScriptsLoaded : function(component, event, helper) { | |
$('.datepicker').datepicker(); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment