I need some help guys… I want use ion-datetime to subtract the hour of two different objects and I’m stucked! How can a subtract a initial hour from a ion-datetime of a Final Hour of another ion-datetime? 1 Like
ion-datetime uses a ISO 8601 string for the date/time value. You can simply convert it to millisecond since epoch using Date.parse and use that number to do your calculations. > new Date().toISOString(); < "2016-10-16T13:47:08.610Z" > Date.parse("2016-10-16T13:47:08.610Z"); < 14766256286102 Likes
mirkonasato:
Thanks a lot! Solve my problem!! Ionic Framework provides a set of CSS utility classes that can be used on any element in order to modify the text, element placement or adjust the padding and margin. <ion-grid>
Text Transformation<ion-grid>
All of the text classes listed above have additional classes to modify the text based on the screen size. Instead of text- in each class, use text-{breakpoint}- to only use the class on specific screen sizes, where {breakpoint} is one of the breakpoint names listed in Ionic Breakpoints. The table below shows the default behavior, where {modifier} is any of the following: left, right, start, end, center, justify, wrap, nowrap, uppercase, lowercase, or capitalize, as they are described above.
The float CSS property specifies that an element should be placed along the left or right side of its container, where text and inline elements will wrap around it. This way, the element is taken from the normal flow of the web page, though still remaining a part of the flow, contrary to absolute positioning. <ion-grid>
All of the float classes listed above have additional classes to modify the float based on the screen size. Instead of float- in each class, use float-{breakpoint}- to only use the class on specific screen sizes, where {breakpoint} is one of the breakpoint names listed in Ionic Breakpoints. The table below shows the default behavior, where {modifier} is any of the following: left, right, start, or end, as they are described above.
The display CSS property determines if an element should be visible or not. The element will still be in the DOM, but not rendered, if it is hidden. <ion-grid>
There are also additional classes to modify the visibility based on the screen size. Instead of just .ion-hide for all screen sizes, use .ion-hide-{breakpoint}-{dir} to only use the class on specific screen sizes, where {breakpoint} is one of the breakpoint names listed in Ionic Breakpoints, and {dir} is whether the element should be hidden on all screen sizes above (up) or below (down) the specified breakpoint.
Content SpaceThe padding class sets the padding area of an element. The padding area is the space between the content of the element and its border. The default amount of padding to be applied is 16px and is set by the --ion-padding variable. See the CSS Variables section for more information on how to change these values. <ion-grid>
The margin area extends the border area with an empty area used to separate the element from its neighbors. The default amount of margin to be applied is 16px and is set by the --ion-margin variable. See the CSS Variables section for more information on how to change these values. <ion-grid>
<ion-grid>
<ion-grid>
The border display CSS property determines if the border should be visible or not. The property can be applied to the ion-header and the ion-footer. <ion-header class="ion-no-border">
Ionic uses breakpoints in media queries in order to style an application differently based on the screen size. The following breakpoint names are used in the utility classes listed above, where the class will apply when the width is met.
|