  {"id":1288,"date":"2020-01-21T16:50:03","date_gmt":"2020-01-21T16:50:03","guid":{"rendered":"https:\/\/www.uri.edu\/styleguide\/?page_id=1288"},"modified":"2021-05-05T20:30:56","modified_gmt":"2021-05-05T20:30:56","slug":"dates","status":"publish","type":"page","link":"https:\/\/www.uri.edu\/wordpress\/components\/dates\/","title":{"rendered":"Dates"},"content":{"rendered":"\n<p class=\"type-intro\">Use dates to display a downloadable calendar event.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Overview<\/h2>\n\n\n\n<p>Here&#8217;s an example date:<\/p>\n\n\n<div class=\"cl-date  \" data-hash=\"eca74c324d3cc95be373796de95dc854\"><form method=\"post\" action=\"https:\/\/www.uri.edu\/wordpress\/wp-content\/plugins\/uri-component-library\/inc\/cl-ics.php\"><input type=\"hidden\" name=\"date_start\" value=\"20210704\"><input type=\"hidden\" name=\"summary\" value=\"Independence Day\"><input type=\"hidden\" name=\"filename\" value=\"independence-day.ics\"><input type=\"submit\" value=\"Add to Calendar\"><\/form><div class=\"cl-date-download-dialogue\"><div>Add to calendar?<\/div><div><div class=\"cl-date-download-cancel\">Cancel<\/div><div class=\"cl-date-download-confirm\">Add<\/div><\/div><\/div><div class=\"cl-date-content-wrapper\" title=\"Add to my calendar\"><div class=\"cl-date-content\"><div class=\"cl-date-download-indicator\"><\/div><div class=\"cl-date-month\">July<\/div><div class=\"cl-date-day\">4<\/div><\/div><\/div><div class=\"cl-date-caption-wrapper\"><div class=\"cl-date-caption\">Independence Day<\/div><\/div><div class=\"cl-date-download-notice\">Check your downloads folder for<\/br>independence-day.ics<\/div><\/div>\n\n\n<p>Dates display a caption when hovering, and when clicked they prompt the user to download a calendar event. Downloaded dates will display a check mark, have a persistent caption, and alert the user to check their downloads folder for the calendar event file.<\/p>\n\n\n\n<p>Dates have a few display options, including changing the accent color and whether or not to display the date&#8217;s year.  Dates can also be floated to the left or right of other page content.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Adding a Date<\/h2>\n\n\n\n<p>On sites using the Block Editor, dates (<img decoding=\"async\" src=\"https:\/\/www.uri.edu\/wordpress\/wp-content\/uploads\/home\/sites\/7\/date.png\" alt=\"Date block editor icon\" class=\"wysiwyg-icon\">) can be added from the block library, under the Component Library section. Date content can be edited directly, and options can be set in the sidebar.<\/p>\n\n\n\n<p>On sites using the older Classic Editor, dates can be implemented by using the shortcode (see the below documentation).<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<div class=\"wp-block-group docs-section\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<h1 class=\"wp-block-heading\">Technical Details<\/h1>\n\n\n\n<p>Dates can be implemented with the shortcode&nbsp;<code class=\"shortcode\">cl-date<\/code>.<\/p>\n\n\n\n<p class=\"code shortcode\">[cl-date date=\"July 4\" caption=\"Independence Day\"]<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Attributes<\/h2>\n\n\n\n<div class=\"wp-block-columns shortcode-attributes is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h3 class=\"wp-block-heading\">date<\/h3>\n\n\n\n<p>(string) (required)<\/p>\n\n\n\n<p>The deadline specified in any <a href=\"https:\/\/www.php.net\/manual\/en\/datetime.formats.php\">PHP date\/time format<\/a><\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h3 class=\"wp-block-heading\">caption<\/h3>\n\n\n\n<p>(string) (optional)<\/p>\n\n\n\n<p>The date description<\/p>\n\n\n\n<p>(default value: none)<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h3 class=\"wp-block-heading\">show_year<\/h3>\n\n\n\n<p>(bool) (optional)<\/p>\n\n\n\n<p>Set to show the year<\/p>\n\n\n\n<p>(default value: <code class=\"bool\">false<\/code>)<\/p>\n<\/div>\n<\/div>\n\n\n\n<div class=\"wp-block-columns shortcode-attributes is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h3 class=\"wp-block-heading\">color<\/h3>\n\n\n\n<p>(string) (optional) (values: <code class=\"string\">blue<\/code>, <code class=\"string\">red<\/code>)<\/p>\n\n\n\n<p>Set the accent color<\/p>\n\n\n\n<p>(default value: <code class=\"string\">blue<\/code>)<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h3 class=\"wp-block-heading\">float<\/h3>\n\n\n\n<p>(string) (optional) (values: <code class=\"string\">left<\/code>, <code class=\"string\">right<\/code>)<\/p>\n\n\n\n<p>Set to float the date either left or right<\/p>\n\n\n\n<p>(default value: none)<\/p>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<h3 class=\"wp-block-heading\">class<\/h3>\n\n\n\n<p>(string) (optional)<\/p>\n\n\n\n<p>Set custom CSS class(es)<\/p>\n\n\n\n<p>(default value: none)<\/p>\n<\/div>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Use dates to display a downloadable calendar event. Overview Here&#8217;s an example date: Dates display a caption when hovering, and when clicked they prompt the user to download a calendar event. Downloaded dates will display a check mark, have a persistent caption, and alert the user to check their downloads folder for the calendar event [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":188,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-1288","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.uri.edu\/wordpress\/wp-json\/wp\/v2\/pages\/1288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.uri.edu\/wordpress\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.uri.edu\/wordpress\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.uri.edu\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.uri.edu\/wordpress\/wp-json\/wp\/v2\/comments?post=1288"}],"version-history":[{"count":12,"href":"https:\/\/www.uri.edu\/wordpress\/wp-json\/wp\/v2\/pages\/1288\/revisions"}],"predecessor-version":[{"id":2076,"href":"https:\/\/www.uri.edu\/wordpress\/wp-json\/wp\/v2\/pages\/1288\/revisions\/2076"}],"up":[{"embeddable":true,"href":"https:\/\/www.uri.edu\/wordpress\/wp-json\/wp\/v2\/pages\/188"}],"wp:attachment":[{"href":"https:\/\/www.uri.edu\/wordpress\/wp-json\/wp\/v2\/media?parent=1288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}