Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
fe6fa9480a | |||
6cb51a3841 | |||
122f73c3c2 |
@ -1,5 +1,9 @@
|
||||
== Changelog ==
|
||||
|
||||
= 5.0.1 - 2024-08-23 =
|
||||
|
||||
- Fixed: incorrect date in the scheduling calendar on the send page.
|
||||
|
||||
= 5.0.0 - 2024-08-19 =
|
||||
|
||||
- Changed: replaced PDO database connection in favor of WordPress's native wpdb;
|
||||
|
@ -69,9 +69,7 @@ export const MailPoetDate: {
|
||||
}
|
||||
return momentDate.format(this.convertFormat(this.options.format));
|
||||
},
|
||||
toDate: function toDate(date: MomentInput, opts?: DateOptions): Date {
|
||||
const options = opts || {};
|
||||
this.init(options);
|
||||
toDate: function toDate(date: MomentInput): Date {
|
||||
return Moment.utc(date).toDate();
|
||||
},
|
||||
short: function short(date: MomentInput): string {
|
||||
|
@ -1,10 +1,10 @@
|
||||
import { Component, SyntheticEvent } from 'react';
|
||||
import Moment from 'moment';
|
||||
import { __, _x } from '@wordpress/i18n';
|
||||
import { registerLocale } from 'react-datepicker';
|
||||
import locale from 'date-fns/locale/en-US';
|
||||
import { Datepicker } from 'common/datepicker/datepicker';
|
||||
import { MailPoet } from 'mailpoet';
|
||||
import { DateOptions } from 'date';
|
||||
|
||||
/**
|
||||
* This function is a copy of the buildLocalizeFn function from date-fns (date-fns/locale/_lib/buildLocalizeFn)
|
||||
@ -134,10 +134,10 @@ class DateText extends Component<DateTextProps> {
|
||||
onChange = (value: Date, event) => {
|
||||
const changeEvent: DateTextEvent = event;
|
||||
// Swap display format to storage format
|
||||
const storageDate = this.getStorageDate(value);
|
||||
const formattedDate = this.getAsStringInFormat(value);
|
||||
|
||||
changeEvent.target.name = this.getFieldName();
|
||||
changeEvent.target.value = storageDate;
|
||||
changeEvent.target.value = formattedDate;
|
||||
this.props.onChange(changeEvent);
|
||||
};
|
||||
|
||||
@ -155,19 +155,10 @@ class DateText extends Component<DateTextProps> {
|
||||
.replace(/\]/g, '');
|
||||
};
|
||||
|
||||
getDate = (date: string) => {
|
||||
const formatting = {
|
||||
parseFormat: this.props.storageFormat,
|
||||
} as DateOptions;
|
||||
return MailPoet.Date.toDate(date, formatting);
|
||||
};
|
||||
getDate = (date: string) => Moment(date).toDate();
|
||||
|
||||
getStorageDate = (date: Date) => {
|
||||
const formatting = {
|
||||
format: this.props.storageFormat,
|
||||
};
|
||||
return MailPoet.Date.format(date, formatting);
|
||||
};
|
||||
getAsStringInFormat = (date: Date) =>
|
||||
Moment(date).format(MailPoet.Date.convertFormat(this.props.storageFormat));
|
||||
|
||||
render() {
|
||||
return (
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
/*
|
||||
* Plugin Name: MailPoet
|
||||
* Version: 5.0.0
|
||||
* Version: 5.0.1
|
||||
* Plugin URI: https://www.mailpoet.com
|
||||
* Description: Create and send newsletters, post notifications and welcome emails from your WordPress.
|
||||
* Author: MailPoet
|
||||
@ -20,7 +20,7 @@
|
||||
*/
|
||||
|
||||
$mailpoetPlugin = [
|
||||
'version' => '5.0.0',
|
||||
'version' => '5.0.1',
|
||||
'filename' => __FILE__,
|
||||
'path' => dirname(__FILE__),
|
||||
'autoloader' => dirname(__FILE__) . '/vendor/autoload.php',
|
||||
|
@ -3,7 +3,7 @@ Contributors: mailpoet, woocommerce, automattic
|
||||
Tags: email marketing, post notification, woocommerce emails, email automation, newsletter
|
||||
Requires at least: 6.5
|
||||
Tested up to: 6.6
|
||||
Stable tag: 5.0.0
|
||||
Stable tag: 5.0.1
|
||||
Requires PHP: 7.4
|
||||
License: GPLv3
|
||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
@ -229,9 +229,7 @@ Check our [Knowledge Base](https://kb.mailpoet.com) or contact us through our [s
|
||||
|
||||
== Changelog ==
|
||||
|
||||
= 5.0.0 - 2024-08-19 =
|
||||
* Changed: replaced PDO database connection in favor of WordPress's native wpdb;
|
||||
* Fixed: dual buttons in MS Outlook;
|
||||
* Fixed: false error notice about MSS connection for editor users.
|
||||
= 5.0.1 - 2024-08-23 =
|
||||
* Fixed: incorrect date in the scheduling calendar on the send page.
|
||||
|
||||
[See the changelog for all versions.](https://github.com/mailpoet/mailpoet/blob/trunk/mailpoet/CHANGELOG.md)
|
||||
|
Reference in New Issue
Block a user