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

SharePoint:DateTimeField cannot have DateOnly="true" when ControlMode="Display"

$
0
0

Hi!

I have a DateTime field configured to show both date and time. If I use the SharePoint:DateTime control in Display-mode and DateOnly-attribute the page will crash! If I remove the DateOnly-attribute it will work but viewing both date and time.

This row displays the date field in Display mode with both the Date and Time:
<SharePoint:DateTimeField ID="ex1" FieldName="myDate" runat="server" ControlMode="Display" />

This row will crash:
<SharePoint:DateTimeField ID="ex2" FieldName="myDate" runat="server" ControlMode="Display" DateOnly="true"/>

Is it possible to show that field in Display mode without the time part?

Regards


Viewing all articles
Browse latest Browse all 7589

Trending Articles



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