Git Product home page Git Product logo

fastis's People

Contributors

ilia3546 avatar muxx avatar riobah avatar uriydevyataev avatar wahab02 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

fastis's Issues

How change the calendar identifier from Gregorian to islamicUmmAlQura ?

private func chooseRange() { var customConfig = FastisConfig.default customConfig.calendar = Calendar(identifier:.islamicUmmAlQura) let fastisController = FastisController(mode: .range, config: customConfig) fastisController.title = "Choose range" fastisController.initialValue = self.currentValue as? FastisRange fastisController.allowToChooseNilDate = true fastisController.shortcuts = [.today, .lastWeek, .lastMonth] fastisController.dismissHandler = { [weak self] action in switch action { case .done(let newValue): self?.currentValue = newValue case .cancel: print("any actions") } } fastisController.present(above: self) }

    I change the calendar identifier from gregorian to islamicUmmAlQura but still display gregorian & i make the FastisConfig default to customize that 

Fastis crashes when added via Swift Package Manager

If Fastis is added to an application via SPM it crashes after opening the calendar view.

In FastisConfig.CurrentValueView there is a definition of an image:

public var clearButtonImage: UIImage = UIImage(named: "icon_clear")!

This line will crash after opening the calendar view since in UIImage + BundleInit.swift extension, bundle is accessed in an incorrect way. For example, if an application MyApp links Fastis via SPM this extension, this extension will attempt to check if there is an image named "icon_clear" in the MyApp bundle, not in Fastis package.

fileprivate class BundleId {}

extension UIImage {
    
    internal convenience init?(named: String) {
        let podBundle = Bundle(for: BundleId.self)
        self.init(named: named, in: podBundle, compatibleWith: nil)
    }
    
}

After some research I have found that most likely instead of using Bundle(for: BundleId.self), Bundle.module should be used. It is suggested in Apple Documentation and in this StackOverflow post and also in this thread.

DIfferent TimeZone Issue

Hi,

i have an issue when using different time zone then current device has eg:

  var customConfig = FastisConfig.default
        ..
  customConfig.calendar.timeZone = TimeZone(secondsFromGMT: 0)!

when picking range it display correct values eg(1st November 2023 -> 30 November 2023) but on top i see the wrong interval
1 November - 1 December

is there anything that i can do, or at least hide the interval label

Problem with cancel and done completion blocks

In my case I need to perform different actions for cancel and done completion blocks. It could be simply implemented if your libary had one block for 2 actions with variable "isCancelled" or "isSuccess" or if there were 2 separate blocks for actions.

Instead your library has doneHandler and dismissHandler. In case of cancel dismissHandler is called only, in case of done they are both called and I need somehow to check if "dismiss" is called separately or immediately after "done"

Performance issues

When the selection range is large, the rendering time of the interface is very long, as if it is stuck.

Version issue

'tertiaryLabel' is only available in iOS 13.0 or newer
Using Fastis 3.1.0
class FastisConfig

one crash issue is there.

file name - Current value view
line no. - 154

there is force unwrapping

public var clearButtonImage: UIImage = UIImage(named: "icon_clear")!

could you please fix this issue?

Thanks

Date picker draggable

When two dates are selected it would be nice to be able to drag one of the dates to change it.

How can be free of dayitem selection?

Hello? I want to show date until this date on calendar.
calendarConroller.maximumDate = Date()
If date is Sep 6 and it show Oct 5.
I don't want to show future month.
Is there any way ?

Bug with FastisConfig.DayCell.rangeViewCornerRadius > 6

`
/**
Corner radius of cell when date is a start or end of selected range

     Default value — `6pt`
     */
    public var rangeViewCornerRadius: CGFloat = 20

`

If you set a value greater than 6, then this bug appears:
Simulator Screenshot - iPhone 15 Pro Max - 2024-01-20 at 17 19 58

How to fix?

SwiftPackage manager error

When I try to add the package with the Swift Package Manager in Xcode I get an error: invalidMainfestFormat. You have to change this platforms: [ .iOS(.v13) ] to this platforms: [ .iOS(.v12) ] in the Package.swift file.

Possibility to mark current day

I would love to see the feature to customize the look of current day in the month view. I didn't find anything related in the configuration. Do you think you could add that feature?

memory leaks

in the file Controller:
Снимок экрана 2023-05-05 в 19 55 39

in the file ShortcutContainerView:
Снимок экрана 2023-05-05 в 19 58 09

in the file ShortcutItemView:
Снимок экрана 2023-05-05 в 19 59 40

-[JTAppleCalendar.JTACMonthView scrollViewDidEndScrollingAnimation:]: unrecognized selector sent to instance 0x10bc45000

Im getting weird behaviour that I cannot figure out... Fastis used to work perfectly and now I have noticed that its not working at all in any of my views, neither UIKit or SwiftUI

I have the following view made based on the SwiftUI section on the README

struct CalendarDatePickerSheetView: View {
    @Binding
    var date: Date?

    var body: some View {
        FastisView(mode: .single) {
            switch $0 {
            case let .done(selectedDate):
                guard let selectedDate = selectedDate else { return }
                date = selectedDate
            case .cancel:
                break
            }
        }
        .title(L10n.Creator.Common.chooseDate)
        .initialValue(date)
        .minimumDate(Date())
        .allowToChooseNilDate(false)
    }
}

then call it as follows

.sheet(isPresented: $vm.isEndDatePickerPresented) {
    CalendarDatePickerSheetView(date: $vm.endDate)
}

and when I press the button in simulator it loads the FastisView and then crashes a second or two later and in simulator it crashes the preview instantly
If I add an all exceptions breakpoint the crash happens in JTACMonthActionFunctions.swift:97 inside scrollToHeaderInSection and the error message is
-[JTAppleCalendar.JTACMonthView scrollViewDidEndScrollingAnimation:]: unrecognized selector sent to instance 0x10bc45000

I unfortunately have no idea why this would happen specifically on this screen and not the other so if you have any ideas what would be causing this it would be greatly appreciated

In View Request

im trying to use this package but itds forcing me to use sheets to get the done callback can we get a customization for blending it in view? maybe onDateChanged callbacks?

Swift UI

Anyway to use this library (plug and play) for swift ui ? Any example will be helpful.

Add option to hide currentValueView

I am using the single mode for the calendar and have come to the realization that the currentValueView is, in fact, redundant, as users can already view the date they have chosen. I believe introducing this option would grant users increased flexibility to tailor the application's appearance and functionality, aligning them more closely with their individual preferences and needs.

Many thanks for this great framework.

Dark Mode

While changing its appearance to dark mode, the color of the title of the date picker is not changing.
Screenshot 2022-04-29 at 3 23 17 PM
Screenshot 2022-04-29 at 3 23 26 PM

Can't localize shortcuts names

Hi. I need to edit shortcuts names in my spoken language.
I cannot find a way. It seems to me that they're not customizable.
Can anyone help me?

Thanks

Add possibility to select range within same day

I have the requirement for the user to be able to select a date range so that start and end are within the same date (end to be start + 3hours). Is this currently possible in .range mode? I found that selecting start and end on the same date, returns nil for range.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.