Announcements
No record found.
Hi all I want to hide data part on a DateTime field is any solutions please
some suggestions
thank u
*This post is locked for comments
Hi,
You can explore the dom, get the element id of the date part control and set it invisible.
For example
document.getElementById("datefieldname_d").style.display = "none";
Will hide the whole data container for the field. You need to use a specific childNode of the element in order to achieve your scenario.
A supported method would be to instead create a new attribute on the entity (a text field called Time) and put that on the form. Take your current DateTime field on the form, make it invisible, then use a JavaScript event on the on the onChange event of the form to validate that it is a valid time.
Then in the onSave event of the form, copy the time over to the Date Time attribute that is hidden on the form (also remember to mark it as Force Submit Always).
That way the user won't be forced to pick a day (although the time selection will be arguably more difficult)
community.dynamics.com/.../crm-2013-toggle-time-portion-of-date-fields.aspx
You said you need to hide the date part, not time. The time can be hidden also from the attribute definition (date-only)
hi as i understood, you want to keep only time and remove the date part. for example you have the date format like "2015-01-20 01:00:00 UTC" so you can do like below.
var datetime ="2015-01-20 01:00:00 UTC"; var myTime = datetime.substr(11, 8); alert(myTime) // 01:00:00 (output). Then you can set it to your field.Thanks.
var datetime ="2015-01-20 01:00:00 UTC"; var myTime = datetime.substr(11, 8); alert(myTime) //
Hi Saroj das
Please Refer this am Trying like this
www.magnetismsolutions.com/.../Hiding_Date_in_CRM_DateTime_Attributes.aspx
find below url
Hi Cornel Croitoriu no am trying hide date only not time
pls refer this
hi KNK, the link specified by you is for CRM 4.0 so it may not work in CRM latest version. If you could post the code for latest version CRM, it will help to other also.
Thanks.
thnks
You can do by adding one HTML web resource..
here are all details
http://mahadeomatre.blogspot.com/2015/01/show-only-time-for-date-time-attribute.html?_sm_au_=iVVPRTf5DZ4Z7MQ6
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
JS-09031509-0 3
AS-17030037-0 2
Mark Eckert 2