Render Date Range on node template

I’m trying to render both start and end date on a node template in Drupal 8 from the Date range field from the content type. I’ve tried multiple ways to no avail.

— Only shows start date —

{{ kint(node.field_date_range.value ) }}   {% if node.field_date_range %} {{ node.field_date_range.value|date(format='l M j') }} {% endif %} 

Recreate old aliases in bulk to reduce their file size, keeping their name and creation date

I noticed that in recent versions of macOS, aliases I create are smaller than they used to be. I have a folder full of old aliases whose sizes range from 50 KB to 6 MB, but new aliases seem to be always less than 1 KB.

I want to recreate all my large, old aliases to save disk space. I know I can update an individual alias by finding the file the alias points to, deleting the alias, and option-command-dragging the original to where the alias was. However, this loses the Date Created of the alias, and more steps are needed to preserve the name of the alias if it is different from the original file. Also, this would take too long to do for my hundreds of aliases. How can I shrink my aliases in bulk while preserving the name and Date Created?

There is another, very similar question Recreate an alias with the same name and timestamp programmatically. The difference is that that question requires an answer that doesn’t change the Date Modified of the alias. I am fine with the Date Modified being updated, as long as the Date Created is unchanged.

I wrote this VPS script to copy “Date Modified” from files in one folder to another but have one query

I wrote this VBS code to copy “Date Modified” from files in one folder to another folder.

Dim sOriginFolder, sDestinationFolder, sFile, oFSO, oShell Set objShell = CreateObject(“Shell.Application”)

Set objFolder = objShell.NameSpace(“C:\Users\asd\Desktop\Destination”)

Set oFSO = CreateObject(“Scripting.FileSystemObject”) Set oShell = CreateObject(“Wscript.Shell”) sOriginFolder = “C:\Users\asd\Desktop\Source” sDestinationFolder = “C:\Users\asd\Desktop\Destination”

For Each sFile In oFSO.GetFolder(sOriginFolder).Files

        Set objFolderItem = objFolder.ParseName(oFSO.GetFileName(sFile))           objFolderItem.ModifyDate = FormatDateTime(sFile.DateLastModified,0) 

Next

It works but there is one issue. If the extension of the file is different, then the script crashes.

How can I fix this?

Bootstrap Date Picker working fine, but an issue with Collapse (Time picker) and Bootstrap Collapse

I’m able to get the date picker and I’ve called the required files as per the documentation but unable to collapse between date and time.

I have read the documentation and also followed the steps mentioned here -Bootstrap Datetime Picker not working with Bootstrap 4 Alpha 6

Here is a video sample – https://youtu.be/poWXMm__ntQ

Any help is greatly appreciated.

Thanks

Date validation to specific year for list Column in view

I’ve got a date column in a view and I’m using a validation formula:

=IF(TEXT([Data documento],"yyyy")="2018",TRUE,FALSE) 

So that users can only insert date within the year 2018.

  • I always get an error when saving the formula, how come?
  • One more question, not quite related, should we mainly do validation through Powerapps forms? Is this the best practice that MS is suggesting for sharepoint?

I’m using sharepoint 365

enter image description here enter image description here

I’ve also tried inserting the formula as Michael Han_MSFT suggested:

=TEXT([Data documento],"yyyy")="2018" 

But unfortunately I still get an error message as shown below enter image description here enter image description here

Highlight Due Date Column with color

I am using SharePoint 2016. There is a Submittal library that has been created and one of the users would like the “Due Date” column to highlight in yellow when a document that has been submitted is open and past due (see image). I am new to Javascript and would like a step by step on how to do this. I am familiar with creating web parts, I guess I just haven’t found the correct code to enter. Please help!

enter image description here