Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

SharePoint 2016 -JavaScript How to get the change event for a Date input field

$
0
0

I have a requirement to pre-populate some date fields of the list item based on date entries for a given field. I am not able to trigger the change even of my date field. To be precise. My list has a date field named Draft Report date. When a user makes an entry on this field, I need to automatically pre-populate Comments Draft Date with a date equal to Draft Report Date + 21.

I am not able to capture the change event of a date field. i found the code below, but it does not work for a date field. 

Any idea?

<scriptsrc="//code.jquery.com/jquery-3.2.1.min.js"type="text/javascript"></script><scripttype="text/javascript">
$(function(){
	$("input[title='field1']").change(function(){
		alert("field changed.");});});</script>


faye fouladi


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>