mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(datetime): do not reset to am when changing hour and pm is set (#21997)
fixes #19175 fixes #19260 fixes #20026 references #16630
This commit is contained in:
@@ -132,6 +132,15 @@
|
||||
<ion-datetime display-format="h:mm A" minute-values="0,15,30,45"></ion-datetime>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>YYYY MMM DD hh:mm A</ion-label>
|
||||
<ion-datetime
|
||||
id="todaysDate"
|
||||
display-format="YYYY MMM DD hh:mm A"
|
||||
minute-values="00,05,10,15,20,25,30,35,40,45,50,55">
|
||||
</ion-datetime>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label>Leap years, summer months</ion-label>
|
||||
<ion-datetime id="customYearValues" display-format="MM/YYYY" pickerFormat="MMMM YYYY" month-values="6,7,8"></ion-datetime>
|
||||
@@ -197,6 +206,9 @@
|
||||
</style>
|
||||
|
||||
<script>
|
||||
var todaysDateDatetime = document.querySelector('#todaysDate');
|
||||
todaysDateDatetime.value = '2020-09-02T17:15:03.488Z';
|
||||
|
||||
var yearValuesArray = [2020, 2016, 2008, 2004, 2000, 1996];
|
||||
var customYearValues = document.getElementById('customYearValues');
|
||||
customYearValues.yearValues = yearValuesArray;
|
||||
|
||||
Reference in New Issue
Block a user