We are using CRM 365 on-Premise V8.2, I need a function that auto format user's input on the date time field. For example, on Contact form, if user enters 01011980, I can use script to change it to 01/01/1980. Any suggestion on how to do this?
Here is what I have done so far:
1) On CRM 2011, we have script add onKeyup event to field with className "ms-crm-DateTime". It doesn't work now. So in the Form_load event, I am trying to add the event using Xrm.Page.getControl("birthdate").addOnChange or addOnKeyPress but I always got error says "Property/Method not found". I am not sure what I did wrong.
2) I add change event to the birthdate field from Form editor. The problem is that, this event only fires when the field has an valid value. Also I am not sure how to get the "raw" value of the user input, CRM date time value returns a long string representing CRM date time.
Thanks
Holly
*This post is locked for comments