Commit d2e4a046 authored by mgabdev's avatar mgabdev

Updated schedule post dropdown

parent 910a3d67
...@@ -11,6 +11,12 @@ const messages = defineMessages({ ...@@ -11,6 +11,12 @@ const messages = defineMessages({
schedule_status: { id: 'schedule_status.title', defaultMessage: 'Schedule Status' }, schedule_status: { id: 'schedule_status.title', defaultMessage: 'Schedule Status' },
}); });
const DatePickerWrapper = ({ value, onClick }) => (
<button className="schedule-post-dropdown-wrapper" onClick={onClick}>
{value}
</button>
);
export default @injectIntl export default @injectIntl
class SchedulePostDropdown extends React.PureComponent { class SchedulePostDropdown extends React.PureComponent {
...@@ -50,6 +56,7 @@ class SchedulePostDropdown extends React.PureComponent { ...@@ -50,6 +56,7 @@ class SchedulePostDropdown extends React.PureComponent {
const { open } = this.state; const { open } = this.state;
const datePickerDisabled = !isPro; const datePickerDisabled = !isPro;
const withPortal = isMobile(window.innerWidth);
return ( return (
<div className='schedule-post-dropdown'> <div className='schedule-post-dropdown'>
...@@ -77,10 +84,11 @@ class SchedulePostDropdown extends React.PureComponent { ...@@ -77,10 +84,11 @@ class SchedulePostDropdown extends React.PureComponent {
timeFormat="p" timeFormat="p"
timeIntervals={15} timeIntervals={15}
timeCaption="Time" timeCaption="Time"
dateFormat="MMMM d, yyyy h:mm aa" dateFormat="MMM d, yyyy h:mm aa"
disabled={datePickerDisabled} disabled={datePickerDisabled}
showTimeSelect showTimeSelect
startOpen customInput={<DatePickerWrapper />}
withPortal={withPortal}
popperModifiers={{ popperModifiers={{
offset: { offset: {
enabled: true, enabled: true,
......
...@@ -5265,20 +5265,6 @@ noscript { ...@@ -5265,20 +5265,6 @@ noscript {
display: flex; display: flex;
align-items: center; align-items: center;
&__datepicker {
margin-left: 4px;
border-radius: 4px;
border: 1px solid #ccc;
line-height: 22px;
padding-left: 6px;
width: 165px;
@media (max-width: 580px) {
width: 146px;
font-size: 10px;
}
}
.react-datepicker-popper { .react-datepicker-popper {
z-index: 1000; z-index: 1000;
} }
...@@ -5318,4 +5304,24 @@ noscript { ...@@ -5318,4 +5304,24 @@ noscript {
margin-right: 10px; margin-right: 10px;
} }
} }
} }
\ No newline at end of file
.schedule-post-dropdown-wrapper {
margin-left: 4px;
border-radius: 4px;
border: 1px solid darken($simple-background-color, 20%);
line-height: 22px;
padding-left: 6px;
text-align: left;
width: 145px;
height: 26px;
line-height: 20px;
color: $inverted-text-color;
background: $simple-background-color;
@media (max-width: 580px) {
width: 138px;
font-size: 10px;
padding-left: 2px;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment