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


  • Read about client side rendering (CSR) and regular expressions, you might also find a similar problem solved in other's questions here – Alexey Krasheninnikov May 20 '17 at 6:49

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">

I have not tested this, but it should work.

Here is the link for more reference. Column validation for US phone number format

| improve this answer | |

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.

| improve this answer | |

standard SharePoint Field Validation rules are SharePoint (Calculated) Formulas

So you could check for (something like)

  • =TEXT( [field] , "dd\mm\yyyy" )

All available functions: http://www.viewmaster365.com/365coach/#/Calculated_Column_Functions_List

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.