Is there a decent date picker (like jQuery UI) that works in Foundation 4? I tried http://foundation-datepicker.peterbeno.com/example/example.html but that doesn't work. And since Foundation 4 wants to use Zepto.js over jQuery, jQuery UI won't load for me.
You can use my port of bootstrap datepicker:
http://foundation-datepicker.peterbeno.com/
https://github.com/najlepsiwebdesigner/foundation-datepicker
We've got full support for foundation 5, (f4 release available), multiple languages available.
Hope it helps! :)
you can just force foundation 4 to only load jquery by default only by changing:
<script>
document.write('<script src=' +
('__proto__' in {} ? 'javascripts/vendor/zepto' : 'javascripts/vendor/jquery') +
'.js><\/script>')
</script>
to
<script src="javascripts/vendor/jquery.js"></script>
or your favorite cdn then go crazy with jquery ui, after you include that as well of course.
I built an interface for Date and Time picking for Foundation. It's a little fresh, but my company has been using it on a production site and it's holding up.
https://github.com/jockmac22/foundation_calendar_date_time_picker
It supports custom date, time and field value formats so you can have a user friendly display of the date and time, with an ISO standard (or any other format) as the final value stored in the field.
I'll admit that I have no idea how it will work with Zepto, but let me know your thoughts if you decide to try it.
Related
I'm testing my UI5 application's performance on a slow 3G connection. I've noticed that it takes quite some time to load the sap.ui.unified.Calendar for the first time when using the sap.m.DateTimePicker.
This is mentioned in the official documentation. The proposed solution is to preload the sap.ui.unified library. I have tried multiple ways of doing this but regardless of what I do, the Calendar still takes long to load the first time.
I have tried adding sap.ui.unified to data-sap-ui-libs in my index.html.
I have tried using jQuery.sap.require("sap.ui.unified") (which is
apparently deprecated).
I have tried using sap.ui.require(["sap/ui/unified/Calendar"]).
None of these solutions work. Any help would be appreciated.
UPDATE
The DateTimePicker is declared as follows in an XML View:
<DateTimePicker
id="dtClockIn"
valueFormat="MM-dd-YYYY hh:mm a"
displayFormat="MM-dd-YYYY hh:mm a"
placeholder="MM-DD-YYYY hh:mm ampm"/>
There's nothing fancy happening in the controller.
1.50 and below
Currently, library resource bundles (messagebundle*.properties files) are loaded on-demand and synchronously which creates a bottleneck before making use of the corresponding control (e.g. Calendar). I'm afraid we can't do much about it.
You could, however, at least prefetch the bundle file by calling getLibraryResourceBundle manually when the UI is ready. E.g. on afterShow:
onAfterShow: function() {
sap.ui.getCore().getLibraryResourceBundle("sap.ui.unified");
// Avoids fetching it later when the Calendar is about to be shown
},
As of 1.52
With v1.52, such bundles are loaded beforehand asynchronously as long as libraries are configured to be loaded asynchronously. Here is an example: https://output.jsbin.com/qolesuf
I recently upgraded my application to GWT 2.7 from GWT 2.5. This has caused me to drop support for IE6 and IE7.
I would like to provide users with IE6 or IE7 with a warning that their browser is outdated and will not work. At the moment if you go to the app with one of those browsers, you get a blank screen.
I know there are a couple ways that I could hack something together but I would rather use the GWT way, rather than some hack. Is there a GWT hook for unsupported browsers?
Option (hack) One
Drop this into my main.html:
if(document.documentMode === 6 || document.documentMode === 7){
myUnsupportedBrowserWarningFunction();
}
Potential problem with this is that if someone is using a browser that GWT doesn't recognise and I don't recognise (mobile opera? Some other browser), they will still get a blank page.
Option (hack) Two
GWT looks for the compiled JS here:
gwt/myApp/ASDFKLSDJFLSFDJSLDFJLSJDFSDES.cache.js
When someone is using an unsupported browser the following is requested (and is not found):
gwt/myApp/undefined.cache.js
It would be possible to create undefined.cache.js and put your unsupported browser code there. This is obviously a brittle solution and will break with future GWT updates.
Option Three
A recent patch (available in GWT 2.7) allows you to provide a default
permutation (e.g. safari) if GWT can not detect the browser and with
deferred binding you can display a warning that the provided app might not
work correctly as the browser is generally unsupported by GWT.
-- J.
Source
I don't want to set a default permutation for unsupported browsers. I want the site to not work and to display a warning. So this solution doesn't really provide what I am looking for.
Similar Questions & Posts
The same question was asked for an eariler version of GWT in 2009. I hope that GWT has added some kind of hook or best practice in the last 6 years.
More info on setting a default (fallback) permutation
You should be able to use onLoadErrorFn for that: https://code.google.com/p/google-web-toolkit/issues/detail?id=8135
<script>
function gwtLoadError(errMsg) {
// GWT app couldn't load, reason in errorMsg
}
</script>
<meta name="gwt:onLoadErrorFn" content="gwtLoadError">
or possibly onPropertyErrorFn:
<script>
function gwtPropError(propName, allowedValues, actualValue) {
if (propName == 'user.agent') {
// unsupported browser
}
}
</script>
<meta name="gwt:onPropertyErrorFn" content="gwtPropError">
(I don't think user.agent.runtimeWarning would help in this case, but maybe have a look)
There is an easy way:
Conditional Comments
<!--[if lt IE 8]>
<p>You are using an unsupportet browser. Please perform an update</p>
<![endif]-->
I think Option 3 may be the best one, but there is a problem: This will start the actual application (which still may be incompatible).
If this is an issue and you want a clear warning, you can rewrite the permutation selection script (You would need to update the script with the upcoming GWT releases)
You will need to copy this source:
https://gwt.googlesource.com/gwt/+/2.7.0/user/src/com/google/gwt/useragent/rebind/UserAgentPropertyGenerator.java
You could add something like:
$wnd.Location.replace('nosupported.html');
between line 90 and 91
At first i tried this with the Calender-Class but then i read, that it is not supported by GWT. Do you have suggestions? Thank you in advance.
Since GWT 2.7 you can use JsDate.
Yes, you should use the deprecated Date API. You should probably create a utility class for such date manipulation, something like CalendarUtil, but for hours/minutes. If Calendar (or any alternative) is every ported to GWT (or a date time library surfaces that is actually maintained), you can change the implementation in your utility class and the rest of your application will remain the same.
I want to make project which must compatible for all device (desktop, mobile, and tablet).
I try look foundation 5 on IE 7, and the result is bad interface. but bootstrap 3, its still looking good.
But I not yet analyze for another things for example SEO better, light framework, mobile/tablet/desktop bug, newest technology.
Could anyone please to share about the above things? thanks
You can check this blog post comparing both frameworks, but this says all:
ZURB and Twitter made their objectives and intentions very clear when
naming each CSS Frameworks: Bootstrap tries to give you everything
you’ll ever need to bootstrap your project. Foundation just gives you
the foundation to build upon.
I'm starting to port over my web app that I've built with Sencha Touch into the Windows 8 world. I'm seeing a lot of WinJS.UI documentation, basically telling me that there are more 'native' feeling animations and UI actions already build into this framework.
My app is already structured, but I'd like to mix in WinJS.UI if I can. How do I go about doing this? I haven't found a link to download the library or anything of the sort.
For example, this link:
http://blogs.msdn.com/b/windowsappdev/archive/2012/05/01/fast-and-fluid-animations-in-your-metro-style-app.aspx
I see that they are using:
<script>
function runAnimation(){
enterPage = WinJS.UI.Animation.enterPage(input);
}
</script>
But I find no documentation on where to include the library.
Little bit lost, any help is appreciated!
These animations are included in the UI.Js from the WinJS Package -- this is the same WinJS that is included in the default Visual Studio Templates. Just create a new HTML Windows Store application, and the details will be there.
Here's your library: http://code.msdn.microsoft.com/windowsapps/Using-the-Animation-787f3720
You can deploy this on your computer and play with the animations.