Articles about European Sharepoint Hosting Service
SharePoint 2013 Hosting – HostForLIFE.eu :: How to Create Past Date Validation In SharePoint 2013?
In this tutorial, I will tell you about how to create past date Validation In SharePoint 2013.
Keep the field text id ready from the input code line in order to map it to the required past date selection validation ie. Selected Date <= Today
1 |
<input type="text" class="input-field datefilingcls hasDatepicker" id="txt_dateofintimation" name="field1" readonly=""> |
Create a JQ function representing link to that field’s id “txt_dateofintimation” for selecting only past dates and the max date is today only with a gap of 3 months.
1 2 3 4 5 6 7 8 9 |
$(document).ready(function() { loadBlankPage(); var dateToday = new Date(); $("#txt_dateofintimation").datepicker({ numberOfMonths: 3, showButtonPanel: true, maxDate: dateToday }); }) |
Go to that site’s page and start filling in the details.
Here is the validation pop up for Date field to be selected.
As shown below in the bottom bar and the function also allows us to select the dates before today as per the validation requirement.
Print article | This entry was posted by Peter on May 18, 2017 at 7:14 am, and is filed under European SharePoint 2013 Hosting. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |