function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
jprichterjprichter 

ui:inputDateTime date and time pickers not displaying properly

We are working on some Lightning Components for a Salesforce Community. We are using our own template which is bare bones. 

Here's the code: 

<aura:component access="global" implements="forceCommunity:availableForAllPageTypes">
<ltng:require styles="/resource/slds2_0_2/assets/styles/salesforce-lightning-design-system.min.css" />
    <ui:inputDateTime label="Meeting Time" class="slds-input" displayDatePicker="true"/>
</aura:component>

In our community, it looks like this:

User-added image

in LEX and in Napili it looks as expected and of course, we don't need the ltng:require tag in there.

Are there any workarounds to this issue?

Scott Haleo 4Scott Haleo 4
Hi,

You can use the standard lightning design system here 

https://www.lightningdesignsystem.com/components/datepickers/#flavor-base-datepicker-default.

For more help you can  share with me your details of issues.

Regards,
Scott Haleo
Hytechpro

 
Laura Sponaas 17Laura Sponaas 17
Any updates to this post?  I am having a very similar issue.  These fields look good in lightning component within Salesforce, but the same component is also being surfaced on an VF Page on a public site... that ends up looking like this:
User-added image

I was orginally using lightning:inputField (s) for all of my fields, however, it seems they will not work for users that have create only access (I am working with Salesforce right now and they are creating a known issue for this for my lightning:inputField problem)

So, my code is pretty simple:
User-added image

<ui:inputDateTime aura:id="Arrival_Date_and_Time" label="Arrival Date and Time" class="field" value="" displayDatePicker="true" />
<ui:inputDateTime aura:id="Departure_Date_and_Time" label="Deptarture Date and Time" class="field" value="" displayDatePicker="true" />

Thanks for any thoughts you can provide!!