I have a list in SharePoint 2013 and i want to add date mask to specific text box on the new form "dd\mm\yyyy"
how can i make masked textbox for date
thanks
I have a list in SharePoint 2013 and i want to add date mask to specific text box on the new form "dd\mm\yyyy"
how can i make masked textbox for date
thanks
You can use below script for input mask on textbox:
<script language="javascript" src="http://code.jquery.com/jquery-1.4.2.min.js" type="text/javascript" ></script>
<script language="javascript" src="http://jquery-joshbush.googlecode.com/files/jquery.maskedinput-1.2.2.min.js" type="text/javascript" ></script>
<script language="javascript" type="text/javascript">
jQuery(function($){
$("input[title='FieldName']").mask("99\99\9999");
});
</script>
I have not tested this, but it should work.
Here is the link for more reference. Column validation for US phone number format
You can use JSLink to achieve the functionality.
There are four to five function you can write by overriding to achieve that.
‘View’ function to render the field if it is included in a list view. In this function you return html.
‘DisplayForm’ function to render the field when the user is viewing the properties of a list item. Also returns html.
‘EditForm’ function to render the field when the user is editing the properties of a list item. Returns html.
‘NewForm’ function to render the field when the user is adding a new list item. Again, should return html. Normally this would be the same as the ‘EditForm’ but it doesn’t have to be.
‘GetValueCallBack’ function to pass the field’s value to SharePoint after the user clicks Submit. This one should return the value type of the field type. In my example, I’ll return a string value.
Details are described in this article.
standard SharePoint Field Validation rules are SharePoint (Calculated) Formulas
So you could check for (something like)
All available functions: http://www.viewmaster365.com/365coach/#/Calculated_Column_Functions_List