When these two plugins are been used together the date format becomes a problem.
Calendar plugin doesn't support YYYY-MM-DD HH:MM:SS format (like 2020-07-01 05:54:00) but the SPM plugin uses YYYY-MM-DD HH:MM:SS format
Is there a way to change SPM date time format to other formats like YYYY/MM/DD HH:MM:SS format?
Or is there a way around to avoid this hassle?
Calendar and SPM plugin together date format problem
-
- AppGini Super Hero
- Posts: 121
- Joined: 2020-02-16 16:29
-
- AppGini Super Hero
- Posts: 121
- Joined: 2020-02-16 16:29
Re: Calendar and SPM plugin together date format problem
Can anyone please suggest a solution?
-
- AppGini Super Hero
- Posts: 121
- Joined: 2020-02-16 16:29
-
- AppGini Super Hero
- Posts: 121
- Joined: 2020-02-16 16:29
Re: Calendar and SPM plugin together date format problem
Found a workaround
After installing the SPM plugin:
goto hooks > TABLE_NAME_filter.php file:
Edit following with format: 'YYYY/MM/DD HH:mm:ss (or any other format you prefer):
That format will work with both Calendar plugin and SPM together
After installing the SPM plugin:
goto hooks > TABLE_NAME_filter.php file:
Edit following with format: 'YYYY/MM/DD HH:mm:ss (or any other format you prefer):
Code: Select all
<script>
$j(function(){
//date
$j("#from-date_2 , #to-date_2 ").datetimepicker({
format: 'YYYY/MM/DD HH:mm:ss' //config
});
$j("#from-date_2" ).on('dp.change' , function(e){
date = moment(e.date).add(1, 'month');
$j("#to-date_2 ").val(date.format('YYYY/MM/DD HH:mm:ss')).data("DateTimePicker").minDate(e.date);
});
});
</script>