Friday, August 10, 2018

Calendar View for List - Wrong Date Interval for End Date.

Calendar View for List - Wrong Date Interval for End Date -

Calendar View shows a day less because since the Only Date field also saves the time by default as 12:00 AM.

To avoid this,

Solutions -

1.  Either convert the Date only field to Date and Time field and ask the user to enter both date and time.

2. Using workflow, add a day more to the End Date.

3. Create a calculated column with return type as Date/Time and add a day more to the End Date
i.e.
Suppose you created a calculated column as,


Now, use the new calculated fields , Visitor's End Date as the new time interval as shown below,



Date formats in Custom Display Form SharePoint

Usually, when a custom display form for a SharePoint list is created having date time fields,

the form shows the date format as,

The format as shown above has a drawback that ,

1. Date field shows time value too.
2. Date field shows an hour less due to which there will occur a day less in the date field.

Solution:-

To avoid the above situation,

Modify the custom display form's xsl as -



Important Note :-

1. Use "string" function to avoid XPath error.
2. 1033 is a locale code.
3. 1 is the date format, the possible values can be 1,4,5,7,12,13,15. Each represents a date format for e.g. y/m/d OR y-m-d etc.

Clearing Person/Group Values

To clear out or empty the values in person or group columns, how you do it depends on if the column is single-value or multi-value. For ...